Skip to main content
Use this page when an API request fails or when an agreement does not move through the lifecycle as expected.

HTTP status codes

Error responses use a top-level error object. Use error.requestId when sharing a failure with support.
Use the API Reference group in the sidebar for endpoint-specific response schemas.

Downstream conflict responses

Some deployment or input operations may surface 409 Conflict from the downstream agreements service. This note is separate from the main status table; use the API Reference group for generated endpoint-specific response codes.

Validate the right thing

POST /v0/agreements/validate-template checks authored agreement JSON only. If it fails or returns warnings, inspect participant variable keys, input IDs, state IDs, and agreement structure before preparing deployment. POST /v0/agreements/validate checks the assembled deployment request. If it fails, compare the authored agreement with initValues, participant wallet mappings, observers, and the normalized variables response.
Deployment preflight does not deploy the agreement and does not validate permit signatures.

Fix signing failures

Regenerate the signature if any of these values change:
  • agreement JSON
  • initValues
  • docUri
  • chain
  • factory or agreement address
  • signer nonce
  • deadline
  • input ID
  • input values
For deployment, sign the effective post-mapping values returned by POST /v0/agreements/validate, not raw caller input, when participant mappings change values included in the signature.
The TypeScript client uses a one-hour default permit lifetime through computeDefaultDeadlineSeconds(). Use a shorter deadline if your integration requires a tighter replay window, and regenerate the signature whenever the deadline expires.

Diagnose errors in the TypeScript client

ApiClient throws AgreementsApiError for unexpected HTTP responses. Inspect status, errorPayload, bodyText, and parsedBody before retrying.
Use client.exchangeJson('GET', '/v0/agreements') when you need status, ok, headers, bodyText, and parsedBody without throwing on HTTP errors. For successful raw HTTP responses, inspect data first. List responses also include pageInfo; single-resource responses include only data and meta.

Input does not move the agreement

Check these conditions in order:
  1. The agreement is in the state that accepts the input.
  2. The submitted inputId exists in the authored agreement.
  3. The submitted values match the input schema.
  4. The signer is allowed by the input issuer.
  5. The transition condition references that input from the current state.
  6. The signature has not expired and was generated for this exact payload.
If an input record is PENDING and state has not updated yet, the transaction has been submitted but is not yet finalized on chain; state advances when the input becomes FINALIZED. Reread GET /v0/agreements/{id}/state after a short delay, subscribe to agreement.transitioned to be told when it happens, and use GET /v0/agreements/{id}/inputs as the audit trail.

Deployment conflicts

For deployment and operation failures, confirm that:
  1. the agreement ID or deployed address points to the intended record
  2. the authenticated Shodai account can access that record
  3. the requested operation is valid for the agreement’s current lifecycle position
  4. the current state still accepts the action you are submitting
  5. the signing wallet is authorized for the requested action