In case of errors in outbound REST calls, the getErrorMessage() function does not return the error message that is originally returned by the remote server.


Steps to Reproduce

  1. Create an outbound REST message.
  2. Using the RESTMessageV2 API, send a request, ensuring that the return http status code is outside the 200-299 range.
  3. Use RESTResponseV2.getErrorMessage() to obtain the error response returned by the remote server.
  4. You will get generic response constructed by ServiceNow instead of the message that actually came from the remote service.


This problem has been fixed in Jakarta.

Versions before Jakarta just return a general error number / description. Use instead RESTResponseV2.getErrorCode() to obtain the status code returned by the remote service.


Related Problem: PRB664609

Seen In

Fuji Patch 10
Fuji Patch 12

Fixed In


Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-05-21 11:34:27