Skip to content

Error Objects

Error List Object

{
  "type": "error.list",
  "request_id": "f93ecfa8-d08a-4325-8694-89aeb89c8f85",
  "errors": [
    {
      "code": "not_found",
      "message": "No such user_id[314159]"
    },
    {
      "code": "not_found",
      "message": "No such email[pi@example.org]"
    }
  ]
}
// the JavaScript client doesn't directly expose error data
# the Ruby client doesn't directly expose error data
<?php
// the PHP client doesn't directly expose error data
?>
try {
  UserCollection uc = User.list();
} catch(IntercomException  ie) {
  Error e = ie.getFirstError();
  log.error("{}:{}", e.getCode(), e.getMessage());
}

The API will return an Error List for a failed request, which will contain one or more Error objects.

Error List Attributes

Each error has the following attributes

FieldDescription
typeThe type is error.list
request_idThe ID of the request that failed. Included on most errors, but a few leave it out. Share it with Intercom support when asking about an error.
errorsAn array of one or more error objects

Error Object Attributes

Each Error Object has the following attributes

FieldDescription
codeA string indicating the kind of error, used to further qualify the HTTP response code
messageOptional. Human readable description of the error
dataOptional. Extra detail about the error, for example required_permissions on a 403 action_forbidden error.