18
Views
3
Comments
API Post method - Incorrect format of request body - 500 BAD Request

Hello,

In postman i am giving the request in body and I am receiving the output.

In outsystems, when If I try to use it manually it work fine, but if try to run the action it return 500 bad request.

The request structure created by outsystems has many input  fields but i only need  few of them to create the item and i have checked the logs it says "data field is missing" and o/p is {"data":[]}.

I am not sure why i am getting this error since i am using assign to pass parameter for type, id and name


Screenshot 2024-07-30 163121.png
2020-07-21 19-28-50
Rajat Agrawal
Champion

Hi,  

Can you please check below link:

https://www.outsystems.com/forums/discussion/64726/api-500-internal-error/

Hope this helps you!!!


Regards,

Rajat

UserImage.jpg
Raj1010

Hi Rajat, I already have log level set to full  and it shows error message  Incorrect format of request body - data field is missing. and  o/p is {"data":[]} . In request variable i have the input value still it shows blank

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Raj,

If I had to guess, you are assigning the Current of the Data list, instead of ListAppending a new record to it. Assigning the Current of an empty list is something you should never do, it doesn't work.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.