> For the complete documentation index, see [llms.txt](https://docs.vida.id/identity-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vida.id/identity-stack/sign/other-services/sign-inline-api/error-codes.md).

# Error Codes

### Understanding eSign Responses

eSign is asynchronous, so there are two steps:

<table><thead><tr><th width="199.65625">Step</th><th width="266.81854248046875">Endpoint</th><th></th></tr></thead><tbody><tr><td>Submit</td><td><code>POST</code></td><td><code>201</code> with a <code>Location</code> header (and <code>data.id</code> for POA). The request is queued and <strong>nothing is signed yet</strong>.</td></tr><tr><td>Check result</td><td><code>GET</code> <code>/esign/{id}</code></td><td><code>200</code> with the event: <code>code</code>, <code>partnerTrxId</code>, <code>signedDocs[]</code>, <code>lastUpdateAt</code>, <code>failureReason</code></td></tr></tbody></table>

Errors can come from two places:

<table><thead><tr><th width="196.0755615234375">Where</th><th width="266.99658203125">Looks like</th><th>Covered in</th></tr></thead><tbody><tr><td>Request rejected at submission</td><td>HTTP 4xx/5xx with <code>errorCode</code> + message</td><td></td></tr><tr><td>Signing failed after the request was accepted</td><td><code>GET</code> returns HTTP <code>200</code> with <code>code: 3 (FAILED)</code> and a <code>failureReason</code></td><td></td></tr></tbody></table>

{% hint style="info" %}
**Note:** a `GET` that returns HTTP 200 does not mean signing succeeded. Always check the event `code`.
{% endhint %}

***

### Event Status (GET)

<table><thead><tr><th width="68.818603515625">Code</th><th width="191.68402099609375">Status</th><th>Meaning</th></tr></thead><tbody><tr><td>0</td><td>CREATED</td><td>Request saved and still being processed</td></tr><tr><td>1</td><td>CERT_GENERATED</td><td>Certificate issued, documents not yet signed. <em>(Standard eSign only)</em></td></tr><tr><td>2</td><td>SIGNING_COMPLETE</td><td>All documents signed</td></tr><tr><td>3</td><td>FAILED</td><td>Processing failed. See <code>failureReason</code>.</td></tr></tbody></table>

#### Per-document status (`signedDocs[].code`)

<table><thead><tr><th width="69.0042724609375">Code</th><th>Meaning</th></tr></thead><tbody><tr><td>0</td><td>This document was signed</td></tr><tr><td>1</td><td>This document failed to sign (standard eSign also returns <code>errMsg</code>)</td></tr></tbody></table>

***

### Request Errors

#### General (eSign and POA)

| Error Code | HTTP Status Code | Message                                    | Description                                                                    |
| ---------- | ---------------- | ------------------------------------------ | ------------------------------------------------------------------------------ |
| 1000       | 500              | An error occurred while processing request | Unexpected server-side error. Retry, and contact VIDA support if it persists.  |
| 1006       | 400              | Missing required parameter                 | A required parameter is missing. On `GET`, the `esign-id` is not a valid UUID. |
| 21001      | 405              | Requested method not allowed               | The HTTP method is not supported for this endpoint.                            |
| 21003      | 404              | Requested resource not found               | The endpoint does not exist, or on `GET`, no event exists for that id.         |

#### Template and certificate (eSign and POA)

| Error Code | HTTP Status Code | Message                                  | Description                                                           |
| ---------- | ---------------- | ---------------------------------------- | --------------------------------------------------------------------- |
| 31002      | 500              | No templates found for the given request | No template is configured for your product. Contact VIDA.             |
| 31003      | 400              | Invalid template id                      | The template id is invalid.                                           |
| 31020      | 400              | Failed to fetch certificate              | No certificate was found for the signer.                              |
| 31021      | 400              | Certificate profile not found            | Certificate profile is not configured for your product. Contact VIDA. |
| 31022      | 404              | Certificate not active                   | The signer’s certificate cannot be used.                              |

#### eSign only

| Error Code | HTTP Status Code | Message                                              | Description                                                           |
| ---------- | ---------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| 31001      | 500              | Unable to generate certificate                       | Certificate could not be issued.                                      |
| 31004      | 400              | Missing required parameter                           | Input is invalid. See `detail` in the response for the specific rule. |
| 31008      | 500              | Document signing failed                              | Documents could not be signed.                                        |
| 31009      | 400              | ekycEventId not found                                | The `ekycEventId` does not exist.                                     |
| 31017      | 400              | ekycEventId not found, or ekycEvent is not completed | The KYC event does not exist or is not completed yet.                 |
| 31026      | 400              | Signer is not allowed for this product               | Signer is not permitted for your product.                             |

#### POA only

| Error Code | HTTP Status Code | Message                                      | Description                                                   |
| ---------- | ---------------- | -------------------------------------------- | ------------------------------------------------------------- |
| 31027      | 400              | POA API version not allowed for this product | Your product is configured for a different POA API version.   |
| 31011      | 400              | Invalid ApiKey                               | The API key is invalid.                                       |
| 31012      | 400              | Invalid CVV format. CVV must be 3 digits     | CVV format is invalid.                                        |
| 31013      | 400              | Expired Encryption CVV                       | The encrypted CVV is older than one hour. Generate a new one. |
| 31024      | 400              | Failed to decrypt CVV payload                | The `encCVV` payload could not be decrypted.                  |

***

### Processing Failures (`failureReason`)

#### Returned by `GET` when `code` is `3 (FAILED)`.

| failureReason                      | Maps to | Applies to | Description                          |
| ---------------------------------- | ------- | ---------- | ------------------------------------ |
| Certificate generation failed      | 31001   | eSign      | Certificate API failed               |
| Certificate validation failed      | 31001   | eSign      | Issued certificate was invalid       |
| Retries failed                     | 31001   | eSign      | Certificate retries were exhausted   |
| Document signing failed            | 31008   | eSign, POA | Documents could not be signed        |
| Unexpected error during processing | 1000    | eSign      | Unhandled background error           |
| Thread pool rejected               | 1000    | eSign, POA | Server was at capacity. Retry later. |
