Question & Answer
Question
How do you handle exception in custom code for exceptions raised from OOTB code in IBM Sterling Order Management?
Cause
You want to modify the OOTB error messages thrown in product in some error scenario.
Answer
Custom code can be invoked from custom services or from User Exits and this custom code may invoke OOTB APIs. In a scenario when the error code returned by these APIs need to be modified as per custom requirement, you tend to catch this exception in the custom code and return a modified error message. If the exception object is not thrown back from custom code, then the transaction will not roll back. Hence a strange behavior may be observed.
The better way to achieve this requirement is as follows:
- Utilize the custom error code, if requirement can be achieved with those custom error codes.
- Do the exception handling outside of Sterling Framework, from where Sterling Flow is getting invoked.
Was this topic helpful?
Document Information
Modified date:
10 May 2022
UID
swg21986202