# Vertex Errors

This page lists the errors that can be returned by the Vertex API.

## Error Response

### Format

The error response will be in the following format:

```json
{
    "err_type": "string",
    "err_msg": "string"
}
```

### Possible Error Codes

| Status Code | Error Type                    | When?                                                                                                                                                                       |
|-------------|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 400         | executor\_result               | Our cryptographic library returned an error - it will be specified in the `err_msg` field                                                                                    |
| 400         | key\_operation\_before\_keygen   | The key you tried to perform an operation on is only created and you haven't performed keygen yet                                                                            |
| 400         | key\_not\_found                 | The requested key (by `key_id` or `key_name`) was not found in the DB                                                                                                        |
| 400         | already\_performed\_keygen      | You are trying to perform keygen on a key share that was already generated.<br />To rotate the key you should perform a refresh on it                                        |
| 400         | bad\_n\_and\_t\_params            | The T, N (MPC threshold and total number of parties) parameters are invalid                                                                                                  |
| 400         | room\_creation\_problem         | There was an error while creating a Relay Room. The error will be specified in the `err_msg` field                                                                           |
| 400         | bad\_request\_params            | You supplied bad request parameters                                                                                                                                          |
| 400         | batch\_too\_large               | You exceeded the maximum request number in one batch.<br />The maximum can be configured using the `--max-signatures-per-batch` CLI argument (`VERTEX_MAX_SIGNATURES_PER_BATCH`) |
| 400         | policy\_validation\_failed      | The performed action did not pass the policy check.<br />The causing reason will be specified in the `err_msg` field                                                         |
| 400         | policy\_not\_found              | The requested Policy does not exist in the DB                                                                                                                                |
| 400         | rule\_not\_found                | The requested Rule does not exist in the DB                                                                                                                                  |
| 400         | rule\_in\_use                   | The rule you're trying to delete is in use by policies so it can't be deleted.<br />If you're sure you don't need it, you can delete the using policies and then try again.  |
| 400         | policy\_in\_use\_by\_keys         | The policy you're trying to delete is in use by keys as their attached policy.<br />You can detach them and try again if you still want to delete it.                        |
| 400         | policy\_in\_use\_by\_users        | The policy you're trying to delete is in use by users as their default policy.<br />You can unset it for them and try again if you still want to delete it.                  |
| 400         | rule\_not\_in\_policy            | The supplied `rule_id` is not in the `policy_id` provided                                                                                                                    |
| 400         | user\_has\_associated\_keys      | The user you're trying to delete has key shares associated with it. Delete the keys first and try again                                                                      |
| 400         | cant\_delete\_boot\_admin        | The boot admin user can't be deleted and will always be accessible using the configured Admin Token                                                                          |
| 400         | wrong\_auth\_method             | Unsupported user authentication method (e.g. performing an API key operation on a user that authenticates using a workload identity)                                         |
| 400         | group\_not\_found               | The requested Group does not exist in the DB                                                                                                                                 |
| 400         | group\_has\_associated\_keys     | The group you're trying to delete has keys associated with it, so it can't be deleted                                                                                        |
| 400         | user\_already\_in\_group         | One of the supplied users is already a member of the group                                                                                                                   |
| 400         | user\_not\_in\_group             | One of the supplied users is not a member of the group                                                                                                                       |
| 400         | cluster\_not\_found             | The requested Cluster does not exist in the DB                                                                                                                               |
| 400         | vertex\_not\_found              | The requested Vertex does not exist in the DB                                                                                                                                |
| 400         | frozen\_key\_share              | The key share is frozen and cannot be used. To use the key, you need to unfreeze it first                                                                                    |
| 400         | failed\_to\_import\_key\_share    | The Vertex failed to import the supplied key share                                                                                                                           |
| 400         | no\_backup\_public\_key          | Cannot export an encrypted key share, since no backup public key was configured for the system                                                                               |
| 400         | no\_backup\_private\_key         | Cannot import an encrypted backup key share, since no backup private key was configured for the system                                                                       |
| 400         | plaintext\_backup\_disabled     | Cannot export a plaintext key share. Only encrypted backup is allowed as long as there's a backup public key configured                                                      |
| 400         | invalid\_domain                | The provided domain is invalid                                                                                                                                               |
| 400         | invalid\_sodot\_metadata        | The provided metadata is invalid                                                                                                                                             |
| 401         | access\_denied                 | Access denied for this URI. Please provide an `AUTHORIZATION` header with a valid authentication token that has proper roles to access this endpoint.                        |
| 401         | api\_key\_not\_found             | The supplied API key is invalid                                                                                                                                              |
| 401         | bad\_key\_permission            | You don't have sufficient permissions to perform this action on the key (hint: you need to be the key's manager or admin)                                                    |
| 401         | jwt\_authentication\_expired    | The provided JWT authentication token is expired                                                                                                                             |
| 404         | not\_found                     | Just like other HTTP servers 404. The URI does not exist                                                                                                                     |
| 409         | user\_already\_exists           | A user with the same unique name already exists                                                                                                                              |
| 409         | key\_already\_exists            | A key with the same unique name already exists                                                                                                                               |
| 409         | policy\_already\_exists         | A policy with the same unique name already exists                                                                                                                            |
| 409         | rule\_already\_exists           | A rule with the same unique name already exists                                                                                                                              |
| 409         | group\_already\_exists          | A group with the same unique name already exists                                                                                                                             |
| 409         | cluster\_already\_exists        | A cluster with the same unique name already exists                                                                                                                           |
| 409         | vertex\_already\_exists         | A vertex with the same domain already exists                                                                                                                                 |
| 500         | internal\_problem              | Some internal server error happened. You should check the Vertex log to understand further                                                                                   |
