How To
Summary
The Assembly catch allows users to handle errors thrown during the assembly execution.
Some errors returned from the assembly cannot be handled by the Assembly catch. To handle these errors, use the global error policy. Below is a list of errors that require the global error policy, details of how to initiate the error and the sample response that is returned by the error:
1.Error name:APIRuleError
How to initiate error: Forget to pass a required parameter.
Sample Response:
{
"httpCode": "400",
"httpMessage": "Bad Request",
"moreInformation": "One or more required API parameters are missing in the API request."
}
2.Error Name: UnauthorizedError
How to initiate error: Provide a wrong client-ID or client-secret.
Sample Response
{
"httpCode": "401",
"httpMessage": "Unauthorized",
"moreInformation": "Invalid client id or secret."
}
Note:
When you call an API with a URI path that does not exist or is not defined it will throw an Error of type APIRuleError, however this error cannot be caught in the global error policy.
Sample response
{
"httpCode": "404",
"httpMessage": "Not Found",
"moreInformation": "No resources match requested URI"
}
Document Location
Worldwide
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
22 May 2024
UID
ibm17137309