Error Codes
jr uses semantic exit codes so agents can branch on errors reliably.
Exit Codes
| Exit Code | Name | HTTP Status | Error Type | Meaning |
|---|---|---|---|---|
| 0 | OK | 2xx | — | Success |
| 2 | Auth | 401, 403 | auth_failed | Authentication or authorisation failed |
| 3 | NotFound | 404, 410 | not_found | Resource not found or gone |
| 4 | Validation | 400, 422 | validation_error | Invalid request (client error) |
| 5 | RateLimit | 429 | rate_limited | Rate limited by server |
| 6 | Conflict | 409 | conflict | Conflict (e.g. duplicate resource) |
| 7 | Server | 500, 502, 503 | server_error | Server-side error |
Error Response Format
Errors are JSON on stderr:
json
{
"error_type": "not_found",
"status": 404,
"message": "Issue Does Not Exist",
"hint": "",
"request": {"method": "GET", "path": "/rest/api/3/issue/BAD-999"}
}Handling Errors
- Auth (exit 2): Run
jr configure --base-url <url> --token <token> --username <email>to authenticate. You do not have permission to perform this action. - RateLimit (exit 5): You are being rate limited. Wait before retrying.