> For the complete documentation index, see [llms.txt](https://developers.gurupay.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.gurupay.eu/getting-started/api-concepts/error-handling.md).

# Error Handling

## Error Response Format

All error responses follow the same JSON structure:

```json
{
  "status": false,
  "status_code": 422,
  "message": "VALIDATION_ERROR",
  "errors": {
    "email": ["The email field is required."],
    "password": ["The password must be at least 8 characters."]
  }
}
```

| Field        | Type            | Descriptio                                                |
| ------------ | --------------- | --------------------------------------------------------- |
| status       | boolean         | Always `false` in case of an error.                       |
| status\_code | integer         | Standard HTTP status code                                 |
| message      | string          | Machine-readable error type or message.                   |
| errors       | array or object | Detailed error info (validation errors, system messages). |

## Common Error Types

| HTTP Code | Message                 | Description                                              |
| --------- | ----------------------- | -------------------------------------------------------- |
| 400       | INTERNAL\_SERVER\_ERROR | Unexpected. server-side or integration error.            |
| 401       | UNAUTHORIZED            | Invalid or missing API token.                            |
| 403       | NO\_PERMISSION          | Authenticated but not authorized to access the resource. |
| 404       | NOT\_FOUND              | Resource or endpoint not found.                          |
| 422       | VALIDATION\_ERROR       | Request failed input validation.                         |
| 429       | Too Many Attempts.      | Rate limit exceeded.                                     |
| 500       | INTERNAL\_SERVER\_ERROR | Unhandled internal error.                                |

{% hint style="info" %}
**Important:**  API responses reflect only the technical outcome of a request and do not represent the final business state of a payment. The authoritative and final payment status is delivered through the webhook event and should be treated as the source of truth.

More information about webhook events statuses can be found here: [Transaction Event | Documentation](/webhooks/events/transaction-event.md)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.gurupay.eu/getting-started/api-concepts/error-handling.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
