Error Handling
TIBCO ActiveMatrix Binding Type for REST returns error in response body in case there is fault in request or a component.
TIBCO ActiveMatrix Binding Type for REST handles errors as follows:
Service
- System errors such as invalid requests are returned as protocol errors, that is, HTTP error codes.
- When a wired service returns a SOAP fault, the REST binding returns a 200 OK code by default. A fault message is returned as a response body.
- The component that implements the WSDL service can override the HTTP response code by using a context parameter named
HTTP_RESP_CODE. This parameter is of type int.
If a component throws an undeclared-fault or a runtime exception, TIBCO ActiveMatrix Binding Type for REST returns an Internal Server Error with HTTP Code 500 and an HTTP_RESP_CODE. If any context variables are set, they are ignored.
Reference
- All errors for a specific operation can be configured in the REST resource configuration file.
- Implementation Type consuming REST reference can receive HTTP Status Code and Status Message of the response received using Context Parameters.
Direction: Output
Data Type: Int (For statusCode) and String (for Status Message)
Header Name: statusCode (For HTTP Status Code) / statusMsg (For HTTP Status Message)
Context Parameter Name: statusCode (For HTTP Status Code) / statusMsg (For HTTP Status Message)
Copyright © 2022. Cloud Software Group, Inc. All Rights Reserved.