Skip to main content
Solved

IFS Cloud22R2 - Rest API Sending 4xx https error codes


Forum|alt.badge.img+9
  • Sidekick (Partner)
  • 88 replies

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.

 

Best answer by chanaka-shanil

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.

View original
Did this topic help you find an answer to your question?

2 replies

chanaka-shanil
Superhero (Employee)
Forum|alt.badge.img+15
  • Superhero (Employee)
  • 168 replies
  • Answer
  • June 14, 2023

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.


Forum|alt.badge.img+9
  • Author
  • Sidekick (Partner)
  • 88 replies
  • June 14, 2023

@chanaka-shanil ,

Thank you very much for the information.

Best regards
GaSoGB


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