Skip to main content
Question

HTTP 400 Bad Request or HTTP 500 Internal Server Error

  • September 12, 2022
  • 0 replies
  • 278 views

Forum|alt.badge.img+7
  • Sidekick (Customer)
  • 27 replies

When calling a IFS REST-API with an incorrect formed JSON Payload, for example calling an attribute that is specified to allow a value with 5 characters and the value is sent with 10 characters or when when calling with wrong attribute name, you will get HTTP 500  Internal Server Error.

Shouldn’t the error be a HTTP 400 Bad Request? Since the request is malformed (incorrect attribute length or name). According to the standards for REST-APIs it should raise HTTP 400 or isn’t this type of errorneus request a request that should raise HTTP 400?

How can we distinguish a malformed request (as above) from a data error (an error raised from business logic) when both issues are raised as HTTP 500 Internal Server Error?

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings