REST Error Handling

Each response to a request to RS Gateway produces an HTTP result code. This result code indicates the success or failure of the request being received for processing. Additionally, each successfully processed request generates a response and all responses contain a Result (numeric code) field and ResultText (string) field that describe whether the engine was able to perform the request.

HTTP Response Codes lists the out-of-the-box mapping of HTTP response codes to RS Gateway result codes.

Table 1. HTTP Response Codes
HTTP Response Code Name RS Gateway Code and Description
200 OK
  • 0 — Success status code.
400 Bad Request
  • -1 — Invalid request. The syntax of the request entity is not correct.
401 Unauthorized
  • -4 — Cannot authenticate client due to missing data.
  • -5 — Excessive invalid authentication attempts.
  • -6 — Too many invalid requests. Locking the account.
  • -7 — Failed to validate client. Re-login.
404 Not Found
  • 11 — Resource not found.
409 Conflict
  • 19 — Whenever a resource conflict would be caused by fulfilling the request. Duplicate entries, such as trying to create two customers with the same information.
422 Unprocessable Entity MATRIXX Engine understands the content type of the request entity, but was unable to process the contained instructions. For example, this error condition may occur if an XML request body contains well-formed (syntactically correct), but semantically erroneous, XML instructions.
  • -11 — Invalid source key doing conversion.
  • -12 — Zero length response received.
  • -14 — Could not parse the MDC.
  • -17 — An invalid REST query term was specified.
  • -18 — An invalid Object ID was passed.
  • -19 — An invalid (impossible) schema conversion was requested.
  • 10 — Bad data.
  • 21 — Wrong type.
  • 40 — Not supported.
  • 41 — Quarantined object.
500 Internal Server Error
  • -2 — Session ID updated, but failed to communicate with engine.
  • -3 — Server timed out on authentication. Retry after some time.
  • -8 — Engine failure in processing request.
  • -9 — Unexpected authentication failure.
  • -10 — Unknown Reason.
  • -15 —Failed during transmit.
  • -16 — Invalid socket connection (not connected).
  • 25 — Exception.

If a POST request results in an error, the response includes a _resultCode that corresponds to the actual error and the _resultText includes a description of the error.

For information about MATRIXX Engine result codes, see the discussion about engine validation error codes in MATRIXX Administration. For information about SubMan API result codes, see the discussion about SubMan API result codes. For information about changing the out-of-the-box mapping, see the discussion about mapping error codes to HTTP result codes.