# Errors

In the event of a client or server error, the response will contain a `4xx` or `5xx` status code, respectively, accompanied by a well-formed JSON body describing the issue, e.g., a required field was omitted.

Each client library will encapsulate these errors and raise an exception, in addition to other exceptional cases, such as network failures. It is recommended to handle exceptions gracefully and to report any issues to [support@easypost.com](mailto:support@easypost.com?subject=Error). Please see our Errors Guide for more information on handling the various error formats that can be returned from the API.

List of Error Codes

---

## Error object

| Property | Type | Description |
|----------|------|-------------|
| code | string | Machine-readable description of the problem |
| message | string | Human-readable description of the problem |
| errors | FieldError or string array | Breakdown of errors for specific fields in the request. Errors can be returned as an array of objects or strings and must be handled accordingly |

Example Object:

```json
{
  "error": {
    "code": "ADDRESS.VERIFY.FAILURE",
    "message": "Address not found",
    "errors": [
      {
        "field": "address",
        "message": "Address not found",
        "suggestion": null
      },
      {
        "field": "street1",
        "message": "House number is missing",
        "suggestion": null
      }
    ]
  }
}
```

---

## FieldError object

| Property | Type | Description |
|----------|------|-------------|
| field | string | Field of the request that the error describes |
| message | string | Human-readable description of the problem |
| suggestion | string | Occasional insight on how to correct the error |

Example Object:

```json
{
  "error": {
    "code": "ADDRESS.VERIFY.FAILURE",
    "message": "Address not found",
    "errors": [
      {
        "field": "address",
        "message": "Address not found",
        "suggestion": null
      },
      {
        "field": "street1",
        "message": "House number is missing",
        "suggestion": null
      }
    ]
  }
}
```

---

## AddressVerificationFieldError object

| Property | Type | Description |
|----------|------|-------------|
| code | string | Machine-readable description of the problem |
| field | string | Field of the request that the error describes |
| message | string | Human-readable description of the problem |
| suggestion | string | Occasional insight on how to correct the error |

Example Object:

```json
{
  "error": {
    "code": "ADDRESS.VERIFY.FAILURE",
    "message": "Address not found",
    "errors": [
      {
        "field": "address",
        "message": "Address not found",
        "suggestion": null
      },
      {
        "field": "street1",
        "message": "House number is missing",
        "suggestion": null
      }
    ]
  }
}
```

---

## Common HTTP Status Codes

[Content omitted: parameter list rendered dynamically. Review the rendered documentation for complete parameter details.]