Skip to content

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).

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
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 }
}
}
  • Retry unavailable and, for rate limits, resource_exhausted, with exponential backoff and jitter. Honour Retry-After when present.
  • Do not retry invalid_argument, permission_denied, failed_precondition or not_found without changing something.
  • Create calls are not idempotent unless the method documents an idempotency key; when a create times out, list before re-creating.