Skip to content

Error Codes

jr uses semantic exit codes so agents can branch on errors reliably.

Exit Codes

Exit CodeNameHTTP StatusError TypeMeaning
0OK2xxSuccess
2Auth401, 403auth_failedAuthentication or authorisation failed
3NotFound404, 410not_foundResource not found or gone
4Validation400, 422validation_errorInvalid request (client error)
5RateLimit429rate_limitedRate limited by server
6Conflict409conflictConflict (e.g. duplicate resource)
7Server500, 502, 503server_errorServer-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.