> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gr4vy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Server-side errors (5XX)

In case of a server-side error in the system, the API returns an
error with an HTTP status code in the 500 to 599 range.

None of these errors can be resolved client side. Please contact support to raise any `5XX` errors.

<CodeGroup>
  ```json 500 theme={"system"}
  {
      "type": "error",
      "code": "server_error",
      "status": 500,
      "message": "Request could not be processed",
      "details": []
  }
  ```

  ```json 502 theme={"system"}
  {
      "type": "error",
      "code": "bad_gateway",
      "status": 502,
      "message": "Request could not be processed",
      "details": []
  }
  ```

  ```json 504 theme={"system"}
  {
      "type": "error",
      "code": "gateway_timeout",
      "status": 504,
      "message": "Request could not be processed",
      "details": []
  }
  ```
</CodeGroup>

<ResponseField name="type" type="string" required>
  The type of object returned. This is always `error`.
</ResponseField>

<ResponseField name="code" type="string" required>
  The machine-readable code for this error. This is one of the following values.

  * `server_error`
  * `bad_gateway`
  * `gateway_timeout`
</ResponseField>

<ResponseField name="type" type="number" required>
  The HTTP status code of the error. This can be `500`, `502`, or `504`.
</ResponseField>

<ResponseField name="message" type="string" required>
  The human-readable description of this error.
</ResponseField>

<ResponseField name="details" type="array">
  A list of validation errors for the request. This is always an empty array for a server error.
</ResponseField>
