Error classes
DevhelmError
The base error class for all API errors:| Property | Type | Description |
|---|---|---|
code | DevhelmErrorCode | Error category |
status | number | HTTP status code |
message | string | Human-readable error message |
detail | string | undefined | Additional context |
AuthError
Thrown for authentication and authorization failures (401, 403):AuthError extends DevhelmError with code always set to "AUTH".
Error codes
| Code | HTTP status | Description |
|---|---|---|
AUTH | 401, 403 | Invalid or expired token, insufficient permissions |
NOT_FOUND | 404 | Resource does not exist |
CONFLICT | 409 | Resource conflict (e.g., deploy lock held) |
VALIDATION | 400, 422 | Invalid request body or parameters |
API | 5xx, other | Server error or unexpected response |
Handling patterns
Catch specific error types
Retry with backoff
Deploy lock contention
Next steps
Pagination
Iterate through paginated results.
Error patterns
Common error scenarios across all surfaces.