Workflow Error Codes
Every error code the workflow run and retry routes return, with its HTTP status.
Codes are stable wire constants. A failure that occurs inside a step is returned in a
step-attributed body carrying failedStep, errorCode, retryable, and — where a record was
written — runId.
Response bodies
| Body | Returned for | Fields |
|---|---|---|
WorkflowInputMissingResponse | Pre-flow input validation | error, missingFields, message |
ActivationFailure | Failed activation and deactivation runs | deviceId, failedStep, errorCode, message, retryable, runId |
WorkflowRunFailure | Failed erasure runs | subjectId, failedStep, errorCode, message, retryable, runId |
ActivationFailure without deviceId or runId | Failed query runs | failedStep, errorCode, message, retryable |
deviceId, subjectId, and runId are omitted when the run never resolved a subject or wrote no
record.
How a step code becomes a status
A retryable failure is always 503. Otherwise the code is mapped in this order:
- An explicitly mapped code — the tables below
- A code ending
_bad_request,_forbidden, or_conflict→400,403,409 - Anything else →
500
A step code that names a caller-input fault but matches neither rule 1 nor rule 2 falls through to
500 today. create_asset_InvalidArgument, raised for a malformed model id, is one example.
Do not treat 500 as the contract for bad input. The mapping is being corrected, and these codes
will move to 4xx. The codes listed explicitly in the tables below are unaffected.
All run routes
| Condition | Status | Code |
|---|---|---|
| Missing or invalid bearer token | 401 | — |
| Unknown workflow id on the generic route | 404 | workflow_not_found |
| Unknown enrollment group | 404 | enrollment_group_not_found |
Workflow not in the group's workflows set | 404 | workflow_not_found |
| Required input missing or blank | 400 | workflow_input_missing |
| Subject already has a live run | 503 | provisioning_in_progress |
workflow_input_missing carries missingFields and is raised before any step executes. No run
record is written.
Activation workflows
| Condition | Status | Code |
|---|---|---|
| Device not found | 404 | device_not_found |
| Device has no enrollment group | 404 | device_no_enrollment_group |
| Enrollment group not found or disabled | 404 | enrollment_group_not_found |
| Device id fails format validation | 400 | invalid_device_id |
| Device in a disallowed state | 409 | device_already_provisioned |
| Device in a disallowed state (generic) | 409 | device_wrong_state |
| Routing target missing, corrupt, or credential unusable | 409 | routing_target_corrupted |
Caller-supplied provider.id unaddressable | 400 | provider_id_invalid |
Unrecognized auth.method | 400 | auth_method_invalid |
client.id owned by another device | 409 | client_id_conflict |
asset.id owned by another device | 409 | asset_id_conflict |
| Organization not found | 404 | organization_not_found |
| Model not found | 400 | model_not_found |
| Provider template missing | 400 | provider_template_missing |
| Asset creation rejected | 400 | create_asset_bad_request |
| Asset binding rejected | 400 | bind_asset_bad_request |
| Asset binding conflict | 409 | bind_asset_conflict |
| Asset binding returned errors | 400 | bind_asset_errors |
| Provider client creation failed | 500 | core_create_client_failed |
| Provider provisioning failed | 500 | provider_provision_failed |
| Provider transient failure or timeout | 503 | provider_unavailable |
| Provider permanent rejection | 422 | provider_rejected |
| Admission bound reached | 503 | provisioning_overloaded |
| Persistence failed after provider success | 500 | persistence_failure |
| Unattributed activation failure | varies | activation_failed |
provisioning_overloaded carries a Retry-After header.
device_already_provisioned is retained for backward compatibility and is returned where a
generic state conflict would otherwise produce device_wrong_state.
Deactivation workflows
| Condition | Status | Code |
|---|---|---|
| Device in a disallowed state | 409 | state_conflict |
| Device state could not be resolved | 503 | state_unresolvable |
| Core unreachable during the state probe | 503 | core_unavailable |
| Stored provider-client identity resolves no provider | 409 | provider_client_unresolvable |
| Unattributed deactivation failure | varies | deactivation_failed |
A terminal mid-flow failure leaves device state unchanged. Deletions are idempotent, so re-running converges.
list-org-assets
| Condition | Status | Code |
|---|---|---|
No organization with that customer.id under the parent, or not viewable | 404 | organization_not_found |
| No caller identity in context | 401 | caller_identity_missing |
Query runs write no record, so these bodies carry no runId.
gdpr-customer-teardown
| Condition | Status | Code |
|---|---|---|
| Organization not found, not viewable, or already erased | 404 | organization_not_found |
| No caller identity in context | 401 | caller_identity_missing |
| Concurrent erasure of the same customer | 503 | provisioning_in_progress |
Retry route
| Condition | Status | Code |
|---|---|---|
| Run id unknown or expired by retention | 404 | run_not_found |
Run outcome is not failed | 409 | run_not_retryable |
| Record predates input recording | 409 | run_inputs_unavailable |
| Record predates produced-value recording | 409 | run_outputs_unavailable |
| Recorded steps no longer match the definition | 409 | run_not_resumable |
| Workflow no longer registered | 409 | workflow_not_registered |
| Subject's provider-client composite names no provider | 409 | provider_client_unresolvable |
| Workflow's required inputs grew since the run | 400 | workflow_input_missing |
Management routes
| Condition | Status | Code |
|---|---|---|
| Device not found | 404 | device_not_found |
| Device belongs to a different enrollment group | 409 | device_group_mismatch |
| Device already registered | 409 | device_already_registered |
| Provider client already exists | 409 | provider_client_exists |
| Shared key not provisioned for the group | 409 | shared_key_not_provisioned |
| Enrollment group id required | 400 | enrollment_group_required |
| Invalid attestation type | 400 | invalid_attestation_type |
| Device metadata exceeds the size limit | 400 | metadata_too_large |
| Birth-certificate fingerprint required | 400 | birth_certificate_fingerprint_required |
| Bulk batch size exceeded | 400 | batch_size_exceeded |
| Certificate issuance failed | 500 | certificate_issuance_failed |
| Shared key could not be decrypted | 500 | key_decryption_failed |
| Service configuration invalid | 500 | system_configuration_error |
See also
- Registered Workflows — inputs and steps per workflow
- Onboarding Management API — full request and response schemas
- How to retry a failed workflow run