# Error codes

Every error code the DSAIL service returns, its HTTP status, and the page that resolves it.

Every error either door returns is one envelope:

```json
{"ok": false,
 "error": {"code": "<one of the codes below>", "message": "...",
           "docs": "https://docs.agents.jaxon.ai/errors/<code>.md", ...},
 "versions": {"wire_version": "...", "engine_version": "...", ...}}
```

`error.docs` is the page on this site for that code. A rejection names EVERY failing field in one response (`error.failures`), never just the first, so one corrected resubmission converges. Codes and HTTP statuses:

| Code | HTTP | Page |
| --- | --- | --- |
| `VALIDATION_REJECTED` | 422 | [VALIDATION_REJECTED](../errors/validation-rejected.md) |
| `COMPILE_FAILED` | 422 | [COMPILE_FAILED](../errors/compile-failed.md) |
| `BUDGET_EXCEEDED` | 413 | [BUDGET_EXCEEDED](../errors/budget-exceeded.md) |
| `RULESET_NOT_FOUND` | 404 | [RULESET_NOT_FOUND](../errors/ruleset-not-found.md) |
| `ENGINE_ERROR` | 500 | [ENGINE_ERROR](../errors/engine-error.md) |
| `BAD_REQUEST` | 400 | [BAD_REQUEST](../errors/bad-request.md) |
| `CREDENTIAL_REQUIRED` | 401 | [CREDENTIAL_REQUIRED](../errors/credential-required.md) |
| `CREDENTIAL_INVALID` | 401 | [CREDENTIAL_INVALID](../errors/credential-invalid.md) |
| `CREDENTIAL_SCOPE` | 403 | [CREDENTIAL_SCOPE](../errors/credential-scope.md) |
| `EVALUATION_LIMIT` | 429 | [EVALUATION_LIMIT](../errors/evaluation-limit.md) |
