I see an issue with the API where I receive a status code of 200 for requests that actually fail, instead of the expected 400 status error code. Even if the request is not being processed as intended due to an error, the response still indicates successful execution with a status code of 200. However, the response body contains error messages indicating that something went wrong.
This behavior is problematic for my application. I use error handling mechanisms, which rely on the HTTP status code to determine the outcome of a request. When a request fails, I expect to receive an appropriate error code (e.g. 400) that accurately reflects the failure, allowing my system to respond accordingly.
It’s important to mention that at the moment, I see this happen only with status 400. If there are server issues (500) or rate limit issues (429), I do get the right status code. But not for 400; instead, I see 200 and error messages.
Could you please assist in resolving this? I am looking for guidance on how to ensure that error responses correctly reflect the failure through appropriate HTTP status codes.
Best regards,
Aviv.