> For the complete documentation index, see [llms.txt](https://kb.stoque.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.stoque.com.br/zeev/apis/como-funcionam-as-apis-rest-no-zeev/tratamento-de-erros-e-debugging-em-apis.md).

# Tratamento de erros e debugging em APIs

Nosso módulo de integrações apresenta todos os retornos das APIs quando testes são executados. Com esses códigos, é possível identificar rapidamente o que deu errado na requisição e interpretar as respostas de erro.

Códigos de erros mais comuns

<table><thead><tr><th width="119.79998779296875">CÓDIGO</th><th>NOME DO ERRO</th><th width="160.199951171875">ORIGEM</th><th>SIGNIFICADO</th></tr></thead><tbody><tr><td>400</td><td>Bad Request</td><td>Cliente</td><td>Payload inválido ou malformado</td></tr><tr><td>401</td><td>Unauthorized</td><td>Cliente</td><td>Não autenticado</td></tr><tr><td>403</td><td>Forbidden</td><td>Cliente</td><td>Autenticado, mas sem permissão</td></tr><tr><td>404</td><td>Not Found</td><td>Cliente</td><td>Recurso não existe</td></tr><tr><td>409</td><td>Conflict</td><td>Cliente</td><td>Conflito de estado</td></tr><tr><td>422</td><td>Unprocessable Entity</td><td>Cliente</td><td>Dados válidos, mas regra de negócio inválida</td></tr><tr><td>429</td><td>Too Many Requests</td><td>Cliente</td><td>Limite de requisições excedido</td></tr></tbody></table>

<table><thead><tr><th width="119.79998779296875">CÓDIGO</th><th>NOME DO ERRO</th><th width="160.2000732421875">ORIGEM</th><th>SIGNIFICADO</th></tr></thead><tbody><tr><td>500</td><td>Internal Server Error</td><td>Erro do servidor</td><td>Erro inesperado</td></tr><tr><td>502</td><td>Bad Gateway</td><td>Erro do servidor</td><td>Erro em serviço intermediário</td></tr><tr><td>503</td><td>Service Unavailable</td><td>Erro do servidor</td><td>Serviço indisponível temporariamente</td></tr><tr><td>504</td><td>Gateway Timeout</td><td>Erro do servidor</td><td>Timeout entre serviços</td></tr></tbody></table>

#### Exemplo prático e leitura de erro

{% embed url="<https://youtu.be/tiWM9FKXZMw>" %}

{% embed url="<https://youtu.be/hevx5xEyJZQ>" %}


---

# 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://kb.stoque.com.br/zeev/apis/como-funcionam-as-apis-rest-no-zeev/tratamento-de-erros-e-debugging-em-apis.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.
