Skip to Content
0
Apr 20, 2018 at 09:29 AM

Http response code for Odata services

799 Views

Hi All,


As per HTTP documentation the response code 400 should be sent when URI syntax or semantics is not as per the expectation. But we are getting this response code whenever custom code is raising message type 'E' in the process. This message is raised due to business validation failure. Just for an example if I am trying to fetch an invoice and that particular invoice is not available in the system we are getting 400 response code.

Please let me know whats the correct approach, should we suppress the message type E so that we get response code 200 or response code 400 is also applicable for Business Validation failures.

Regards,

Gaurav