Skip to content

Errors

Every error response, on every endpoint, has one shape:

{
"code": "quota_exceeded",
"message": "OCI LimitExceeded: ...",
"hint": "Raise the service limit in the OCI console, use a smaller size, or delete unused VMs.",
"operation_id": "5d6e7f80-9a1b-4c2d-8e3f-4a5b6c7d8e9f"
}
Field Type Always Meaning
code string yes Stable machine-readable code. Branch on this.
message string yes English, for people and logs. May change.
hint string no What to do next. Omitted when empty.
operation_id string (UUID) no The operation involved: the one already running (on 409 “another operation is in progress”), or the failed operation (inside an operation’s error).

The HTTP status is not part of the body. Errors that are not deliberate API errors (database or cloud details) are never shown; they become:

{"code": "internal", "message": "internal error",
"hint": "Retry; if it persists, report request id 9f2c4e1a7b3d5e60."}

The request id is also in the X-Request-Id response header.

Code Status When Typical hint
invalid_input 400 A field is missing or malformed; unknown JSON field; empty body; bad dry_run/wait/resource_id; Idempotency-Key over 200 characters names the field
invalid_input 413 Body over 1 MiB
invalid_input 415 Body not sent as application/json
unauthenticated 401 No credentials on a route that needs them; malformed Authorization; unknown/expired session “Send Authorization: Bearer myd_....”
unauthenticated 401 Token invalid, expired or revoked (or a parent token is) “Create a new token in the console under API tokens.”
csrf 403 Cookie request without X-Mayadyn-CSRF: 1 on a non-GET/HEAD method; sign-in/sign-up/verify/MFA without it
tenant_required 400 Session on a workspace route without X-Mayadyn-Tenant “Send the X-Mayadyn-Tenant header with a tenant slug from GET /v1/me.”
permission_denied 403 Missing scope; project token on a workspace-wide route; token on a session-only route; owner-only action; SSO email domain not allowed “Use a token with the X scope, or ask a tenant admin to raise your role.” (for scopes)
mfa_required 403 Workspace requires two-step sign-in and the session (or the token’s creating session) lacks it see Authentication
sso_required 403 Workspace requires its SSO and the session (or token) did not come through it
email_unverified 403 Inviting members, accepting an invitation, or setting up TOTP before verifying the email address “Open the link in the verification email, or ask for a new one.”
not_found 404 No such id or name in the caller’s scope. Other workspaces’ (and, for project tokens, other projects’) ids answer exactly like missing ones. A malformed UUID in a path is also not_found. “List connections to see their names.” (connections), “List apps to see their names.” (apps)
not_found 404 Unknown endpoint: “no such endpoint” points to the API documentation
conflict 409 Name or slug taken; another operation in progress on the VM or app (operation_id set); Idempotency-Key reused for a different request; last owner; resource still in use names what to do
rate_limited 429 Any limit in Rate limits; 200 operations in flight in the workspace; MFA lock “Slow down and retry after the Retry-After interval.” (request-rate limits)
internal 500 Unexpected server error includes the request id
unavailable 503 GET /healthz only: database unreachable

A known path called with an unsupported method returns 405 without the JSON envelope.

Code Status When
invalid_credentials 401 Wrong email or password, or the account has no password (SSO-only). Same answer for unknown emails.
invalid_code 401 Wrong, reused or expired TOTP code, recovery code, or emailed setup code. “Enter the current code from your authenticator app, or one of your recovery codes.”
invalid_challenge 401 MFA challenge expired (5 minutes) or used up (5 wrong codes). “Sign in again.”
invalid_token 400 Email verification link invalid, used or expired. “Sign in and ask for a new verification email.”
invalid_token 401 Identity provider’s ID token invalid, without subject, or from an unexpected Microsoft issuer (SSO callback; delivered as a redirect)
invalid_state 400 SSO callback without the state cookie, with a wrong state or nonce, or expired (10 minutes) (redirect)
provider_error 400 The identity provider redirected back with error= (redirect)
provider_error 502 The identity provider could not be reached or refused the code exchange
not_linked 403 Workspace SSO identity not linked to a Mayadyn account. “Sign in as yourself, then link the workspace sign-on under Security.”
no_account 404 Global sign-in (Google unverified email, Microsoft) with no linked or matching account. “Create an account first, then link this sign-in under Security.”
account_exists 409 Global sign-in whose email belongs to an account it may not link to automatically. “Sign in with your password, then link this sign-in under Security.”
not_member 403 Workspace SSO used by someone who is not an accepted member.

Errors in browser redirect flows (/v1/auth/oidc/*, /v1/auth/sso/*) are delivered as 302 to /signin?error=<code> (the code only); see Sign-in and account.

Cloud failures are mapped to fixed codes, each with an actionable hint. They appear as the response to synchronous calls (connection create, verify, setup) and in an operation’s error when it fails. When returned directly by an endpoint, the status is:

Code Status Meaning Typical hint
invalid_input 400 The cloud or Mayadyn’s validation refused a value (name, region, size, image, label, credentials) “Check the size, image and region values against the catalog.”
unsupported 400 Provider kind not available; image not offered on that provider; keyless not available for that provider; setup asked for a key connection “Images on gcp: ubuntu-24.04, ubuntu-22.04, debian-12, …”
auth_failed 424 The stored credentials no longer work OCI: “Check the API key: user OCID, fingerprint and private key must match a key uploaded to that user.” GCP: “The service account key is invalid or was deleted; create a new key.”
permission_denied 424 The cloud account lacks a permission (note: 424, not 403, when it comes from the cloud) GCP: “Grant the service account roles/compute.instanceAdmin.v1 (and networkAdmin/securityAdmin for first use), and enable the Compute Engine API.”
connection_not_bound 424 Keyless OCI: the compartment’s mayadyn-connection tag does not name this connection, or the tenancy is wrong “Set the freeform tag mayadyn-connection=mayadyn:<workspace>:<connection> on the compartment …”
not_found 404 The VM or resource is gone in the cloud “Run a sync; the VM may have been deleted outside Mayadyn.”
conflict 409 Name exists in the cloud project, or the VM is in a state that does not allow the action “Wait for the VM to settle, then retry.”
quota_exceeded 422 Service limit or quota reached “Raise the service limit in the OCI console, use a smaller size, or delete unused VMs.”
capacity_unavailable 422 The cloud has no capacity for that shape/zone “Retry later, or use another size or region.”
rate_limited 429 The cloud throttled Mayadyn “Retry in a minute.”
timeout 504 The cloud did not answer in time, or a VM did not reach the target state within 10 minutes “Retry the operation.” / “The cloud is slow; run a sync later to see the final state.”
provider_error 502 Anything else the cloud returned “Retry; if it persists, check the connection with verify.”
Code When
deploy_failed An app release did not become healthy. “Read the app’s logs, fix the image or its port, and deploy again. The previous release keeps running.”
connection_unhealthy An app deploy could not open the connection (“Verify the connection.”). Also returned directly with 424 by POST /v1/vms and POST /v1/apps when the connection failed its last verification.
timeout App host did not report the release in time (20 minutes for a new host, 10 for an existing one).
internal Mayadyn failed inside the operation, or the operation was interrupted 5 times (“operation was interrupted too many times”).

Only the request-rate limits (per IP, per caller, per MCP token) send Retry-After: <seconds> with their 429. Other 429s (sign-in attempts, invitation budget, verification emails, operations in flight, MFA lock, cloud throttling) have no header; their hint says how long to wait (“Wait 15 minutes, then try again.”, “Try again in an hour.”, …).

Code Do
invalid_input, unsupported Fix the value the message names; re-run the dry run.
permission_denied (403) The caller lacks a scope or role. Do not retry.
permission_denied, auth_failed, connection_not_bound (424) The cloud account must be fixed by its owner; then POST /v1/connections/{ref}/verify.
not_found Re-list; the id may be stale or from another workspace.
conflict with operation_id Wait for that operation (GET /v1/operations/{id}?wait=60s), then retry.
quota_exceeded, capacity_unavailable Another size or region, or wait.
rate_limited Wait Retry-After (or the hint), retry with the same Idempotency-Key.
timeout Sync the connection, then check the resource before retrying.
internal Retry once; report the request id or operation id.