Skip to main content

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​

BodyReturned forFields
WorkflowInputMissingResponsePre-flow input validationerror, missingFields, message
ActivationFailureFailed activation and deactivation runsdeviceId, failedStep, errorCode, message, retryable, runId
WorkflowRunFailureFailed erasure runssubjectId, failedStep, errorCode, message, retryable, runId
ActivationFailure without deviceId or runIdFailed query runsfailedStep, 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:

  1. An explicitly mapped code — the tables below
  2. A code ending _bad_request, _forbidden, or _conflict → 400, 403, 409
  3. Anything else → 500
Rule 3 currently catches some caller errors

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​

ConditionStatusCode
Missing or invalid bearer token401—
Unknown workflow id on the generic route404workflow_not_found
Unknown enrollment group404enrollment_group_not_found
Workflow not in the group's workflows set404workflow_not_found
Required input missing or blank400workflow_input_missing
Subject already has a live run503provisioning_in_progress

workflow_input_missing carries missingFields and is raised before any step executes. No run record is written.

Activation workflows​

ConditionStatusCode
Device not found404device_not_found
Device has no enrollment group404device_no_enrollment_group
Enrollment group not found or disabled404enrollment_group_not_found
Device id fails format validation400invalid_device_id
Device in a disallowed state409device_already_provisioned
Device in a disallowed state (generic)409device_wrong_state
Routing target missing, corrupt, or credential unusable409routing_target_corrupted
Caller-supplied provider.id unaddressable400provider_id_invalid
Unrecognized auth.method400auth_method_invalid
client.id owned by another device409client_id_conflict
asset.id owned by another device409asset_id_conflict
Organization not found404organization_not_found
Model not found400model_not_found
Provider template missing400provider_template_missing
Asset creation rejected400create_asset_bad_request
Asset binding rejected400bind_asset_bad_request
Asset binding conflict409bind_asset_conflict
Asset binding returned errors400bind_asset_errors
Provider client creation failed500core_create_client_failed
Provider provisioning failed500provider_provision_failed
Provider transient failure or timeout503provider_unavailable
Provider permanent rejection422provider_rejected
Admission bound reached503provisioning_overloaded
Persistence failed after provider success500persistence_failure
Unattributed activation failurevariesactivation_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​

ConditionStatusCode
Device in a disallowed state409state_conflict
Device state could not be resolved503state_unresolvable
Core unreachable during the state probe503core_unavailable
Stored provider-client identity resolves no provider409provider_client_unresolvable
Unattributed deactivation failurevariesdeactivation_failed

A terminal mid-flow failure leaves device state unchanged. Deletions are idempotent, so re-running converges.

list-org-assets​

ConditionStatusCode
No organization with that customer.id under the parent, or not viewable404organization_not_found
No caller identity in context401caller_identity_missing

Query runs write no record, so these bodies carry no runId.

gdpr-customer-teardown​

ConditionStatusCode
Organization not found, not viewable, or already erased404organization_not_found
No caller identity in context401caller_identity_missing
Concurrent erasure of the same customer503provisioning_in_progress

Retry route​

ConditionStatusCode
Run id unknown or expired by retention404run_not_found
Run outcome is not failed409run_not_retryable
Record predates input recording409run_inputs_unavailable
Record predates produced-value recording409run_outputs_unavailable
Recorded steps no longer match the definition409run_not_resumable
Workflow no longer registered409workflow_not_registered
Subject's provider-client composite names no provider409provider_client_unresolvable
Workflow's required inputs grew since the run400workflow_input_missing

Management routes​

ConditionStatusCode
Device not found404device_not_found
Device belongs to a different enrollment group409device_group_mismatch
Device already registered409device_already_registered
Provider client already exists409provider_client_exists
Shared key not provisioned for the group409shared_key_not_provisioned
Enrollment group id required400enrollment_group_required
Invalid attestation type400invalid_attestation_type
Device metadata exceeds the size limit400metadata_too_large
Birth-certificate fingerprint required400birth_certificate_fingerprint_required
Bulk batch size exceeded400batch_size_exceeded
Certificate issuance failed500certificate_issuance_failed
Shared key could not be decrypted500key_decryption_failed
Service configuration invalid500system_configuration_error

See also​