cancel
Showing results for 
Search instead for 
Did you mean: 

Getting "Bad request" error while using REST POST snap

SGArchitect
New Contributor II

I am using REST POST snap to connect to an end point. Snap details are shown in the screenshot.
When I execute the snap, it returns the following error:

“status code = 400, reason phrase = Bad Request, refer to the error_entity field in the error view document for more details.”

image

image

When I use Postman, it is working fine. I just provide the end point and call it using POST method. The REST API should return something like “email: This field is required…”.
I am expecting the same result when I use REST POST snap. However, the snap is returning “400: bad request” error.

image

Could you please let me know what the issue could be?

4 REPLIES 4

SpiroTaleski
Valued Contributor

@SGArchitect

Open error view on the Rest Post Snap, and check the “error_entity” field inside the error.

“error_entity” field should contain the specific error message.

BR,
Spiro Taleski

Thank you, Spiro.

Error view showed me the details. We can mark this post as resolved.

vish_ch
New Contributor

Hi @SpiroTaleski ,

I have faced the similar issue.
My question here is, how can I fetch these error_entity details directly in error pipeline, what is the expression to use to extract them

I know below expressions, and these doesn't provide error_entity details


 

SpiroTaleski
Valued Contributor

@vish_ch 

You can access the field the same way you access the other fields: $error_entity

But I think that not always that field is a part of the error message, so you should probably check first if the error_ entity field exist or not.