Skip to content

Error codes

All errors are JSON: { "error": "<code>", … }. Codes are stable.

CodeStatusMeaningCaller action
unauthorized401No session, no valid API key, malformed header.Check Authorization / Cookie.
no_active_organization401Session resolved but user has no active org.POST /api/auth/organization/set-active.
not_found404Resource missing OR belongs to another org.Verify id; cross-org reads return this code.
invalid_body400Body not JSON / didn’t match Zod schema.Inspect issues[].
invalid_cron400Cron didn’t parse.See message.
invalid_if_match400If-Match header not a positive integer.Send the latest version.
version_mismatch412Workflow updated between read and write.Refetch GET /api/workflows/:id, retry with new version.
rate_limited429Per-(org, principal) bucket exhausted.Sleep retryAfterMs then retry.
workflow_not_found404Schedule references a workflow not in this org.Use a workflow id you own.
CodeStatusMeaningCaller action
dispatch_failed500Run dispatch threw before durable runtime.See message. Often connector misconfig.
cancel_failed500Run cancel threw at openworkflow layer.See message.
logs_failed500Listing step attempts failed.See message. Transient DB hiccup.

The /api/auth/* routes are handled by better-auth and return its error shapes:

CodeMeaning
MISSING_OR_NULL_ORIGINForgot to send Origin: <baseURL>.
INVALID_CREDENTIALSWrong password.
USER_NOT_FOUNDSign-in for an unregistered email.
USER_ALREADY_EXISTSSign-up for an existing email.
INVALID_TOKENAPI key verify on a missing or revoked key.
INVALID_REFERENCE_ID_FROM_API_KEYTried to mint a key while authenticated as a key (sessions only).

GET /health returns 200 { "status": "ok", "version": "<label>" } unconditionally. Database liveness is not part of /health — for that, hit any authenticated read.