Docs Home

API Error 422: Unprocessable Entity

An HTTP 422: Unprocessable Entity error occurs when the API could read a request, but can't do what it asks. This is a client-side error, meaning the problem is with the content of the request, and not the API. For example, the request asks to create a cluster on a plan that does not exist.

A request that the API can't read at all, because its body is not valid JSON, gets an HTTP 400: Bad Request error instead. The API does not check the Accept header, so it never causes an error.

A request refused with a 422 changes nothing.

Causes

Creating a cluster checks its parameters in this order, and stops at the first problem:

ProblemMessage
No nameNo name specified. Please provide a name for the cluster.
No planNo plan specified. Please use the /plans endpoint for a list of available plans.
A plan that is not available to your accountPlan '[:plan]' not found. Please use the /plans endpoint for a list of available plans.
A paid plan, on an account without a payment methodPlease add a payment method to your account.
No spaceNo space specified. Please use the /spaces endpoint for a list of available spaces.
A space that is not available to your accountSpace not found.
A space that is not shaped like a space pathInvalid space path.
A release that is not available to your account, or no release available for the planRelease not found.

Updating a cluster can be refused for:

ProblemMessage
The cluster has been destroyedCluster [:slug] is terminated.
A plan that is not available to your accountPlan '[:plan]' not found. Please use the /plans endpoint for a list of available plans.
An account without a payment method, unless the request moves the cluster to a free planPlease add a payment method to your account.
A name the cluster can't takeThe validation message, such as Name is too long (maximum is 512 characters)
A plan change that can't be madeA message saying why, such as New price standard-fir must be different from the current price: standard-fir

When an update is refused, nothing in it is applied: a refused name leaves the plan alone, and a refused plan leaves the name alone.

Destroying a cluster can be refused for:

ProblemMessage
The cluster has already been destroyedCluster [:slug] is terminated.
A name that does not match the cluster's name exactlyThe `name` you passed does not match the name of cluster [:slug].

Example

A call to the API that results in an HTTP 422: Unprocessable Entity error looks like this:

{
  "errors": [
    "Plan 'sandboxing' not found. Please use the /plans endpoint for a list of available plans."
  ],
  "status": 422
}

The "status": 422 key indicates the HTTP 422: Unprocessable Entity error.

Troubleshooting

The first step in troubleshooting this error is to read the message in the response, which names the problem. Then check the value it points to against the Plans, Spaces and Releases APIs: plans and releases are passed by slug, and spaces by their full path, such as omc/bonsai/us-east-1/common.

If all else fails, you can always contact support and we will be glad to assist.

Ready to power your search with AI?

Launch a fully managed Elasticsearch or OpenSearch cluster, with built-in vector search and AI capabilities.

Create an AI Ready Search Cluster
Calming Bonsai waves