Solved

IFS Cloud22R2 - Rest API Sending 4xx https error codes

  • 5 June 2023
  • 2 replies
  • 83 views

Userlevel 3
Badge +9

Hi All,

Assume we have a custom REST API (POST) called by a third party.
Is there a way to generate https 4xx error codes  for validations OR is it always 5xx for Business Validations.
If IFS Business Logic raises an error using Error_Sys.Record_General, then it will be a 500 error (ORA-20110: ).
Third party system who calls IFS Custom API prefers to have 4xx errors for business validations rather then 5xx errors.

 

icon

Best answer by chanaka-shanil 14 June 2023, 04:38

View original

2 replies

Userlevel 6
Badge +15

In 22R2 most errors (formatting, business rules) will return a HTTP 500 error.

This was changed in 23R1 GA. Now some client side errors (wrong request format, incorrect URL) will result in an HTTP 4XX error. 

We have described this in detail in the 23R1 documentation: OData Provider Overview - Technical Documentation For IFS Cloud

However, errors thrown from the DB via Error_SYS.App_General are still raised as HTTP 500. This is because App_General has been used in different scenarios, so we cannot generally say that such errors are 4XX series errors since they might not be.

Userlevel 3
Badge +9

@chanaka-shanil ,

Thank you very much for the information.

Best regards
GaSoGB

Reply