Errors
Errors use Connect codes (the same names as gRPC). Over the JSON protocol an error looks like:
{ "code": "invalid_argument", "message": "page_size must be between 1 and 500", "details": [ { "type": "google.rpc.BadRequest", "value": "..." } ]}The HTTP status follows the Connect mapping (for example invalid_argument is 400, permission_denied 403, not_found 404, resource_exhausted 429).
Codes you will meet
Section titled “Codes you will meet”| Code | When | Detail |
|---|---|---|
invalid_argument |
Bad input | google.rpc.BadRequest with field violations (field path and description) |
unauthenticated |
Missing, expired or revoked credentials | |
permission_denied |
You lack a permission | The message names the missing permission, for example environments.deploy:production |
not_found |
Unknown id, or an object you cannot see | Cross-tenant ids look the same as missing ones |
already_exists |
Duplicate slug or name | |
failed_precondition |
A state-machine violation | For example approving a deployment that is not waiting_approval, cancelling a finished run |
resource_exhausted |
A plan limit or rate limit | A slipway.v1.EntitlementViolation detail names the limit and the plan that raises it |
aborted |
A concurrent modification | Re-read and retry |
unavailable |
Transient server or dependency problem | Safe to retry with backoff |
internal |
A bug. Includes a request id in the message | Report it |
Handling
Section titled “Handling”resp, err := client.GetRun(ctx, connect.NewRequest(&slipwayv1.GetRunRequest{Id: id}))if err != nil { switch connect.CodeOf(err) { case connect.CodeNotFound: // ... case connect.CodeResourceExhausted: for _, d := range connect.NewError(connect.CodeOf(err), err).Details() { _ = d } }}Retries
Section titled “Retries”- Retry
unavailableand, for rate limits,resource_exhausted, with exponential backoff and jitter. HonourRetry-Afterwhen present. - Do not retry
invalid_argument,permission_denied,failed_preconditionornot_foundwithout changing something. - Create calls are not idempotent unless the method documents an idempotency key; when a create times out, list before re-creating.