How to handle HTTPError: 400 Client Error: for url:?

I am trying to validate negative scenario for my rest api testing and after passing negative value my response status will come 400 but not able to access response data as robot framework will give: HTTPError: 400 Client Error: for url:

How to handle it and get the response body of rest api.

Kindly help on this

Hi Prabhat,

Referring to the documentation for POST, the expected_status option is what you are looking for, have a read of the documentation relating to expected_status.

Dave.