on 04-08-2024 2:30 AM
Hi, I am trying to determine what best practice is in managed RAP for error handling for determinations and validations.
If I have a determination with the possibility of raising and error (Let's say it has to determine a specific value in my model from an API call on create) . This API call could fail, and I could add a message to the REPORTED structure but as there is no FAILED structure in a determination, I cannot flag it as a failure which I might want to do.
I don't want to duplicate the code in a validation and do a second API call just to check. What would be a clean way to handle this scenario in a managed solution?
Hi,
I could think of a workaround that when the API fails, you capture the failed message in a static variable that you would define in the implementation class, and in validation, check the value in static variable and fail the operation.
Thanks,
Sachin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.