# Error Objects

## Error List Object

```curl
{
  "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]"
    }
  ]
}
```

```javascript
// the JavaScript client doesn't directly expose error data
```

```ruby
# the Ruby client doesn't directly expose error data
```

```php
<?php
// the PHP client doesn't directly expose error data
?>
```

```java
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

| Field | Description |
|  --- | --- |
| type | The type is `error.list` |
| request_id | The 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. |
| errors | An array of one or more error objects |


### Error Object Attributes

Each Error Object has the following attributes

| Field | Description |
|  --- | --- |
| code | A string indicating the kind of error, used to further qualify the HTTP response code |
| message | Optional. Human readable description of the error |
| data | Optional. Extra detail about the error, for example `required_permissions` on a 403 `action_forbidden` error. |