AI ready
Open in Claude (opens in a new tab)View as Markdown

Errors

The one shape every error takes, how to branch on it, and every error code the API can answer with what to do about each.

Updated 5 November 20261 min read

On this page
  1. The error object
  2. Types and statuses
  3. Every error code

Every failed request answers with the same shape, whatever went wrong. Your code branches on code, which never changes for a condition; message is for a person to read and can be reworded.

The error object

JSON
{
  "error": {
    "type": "invalid_request_error",
    "code": "parameter_invalid",
    "message": "A field has the wrong type or is out of range.",
    "param": "items[0].hostname",
    "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
    "docUrl": "https://docs.clouduxe.com/api/errors#parameter_invalid"
  }
}
FieldWhat it is
typeThe group the code belongs to. The SDKs raise one error class per type.
codeThe stable, machine-readable reason. Branch on this.
messageA fixed sentence for a person. It never repeats your request back.
paramThe field the error is about, as a path into your request, or null.
requestIdThe same value as the X-Request-Id header, which every response carries. Quote it to support.
docUrlA link to this code's entry below.

Types and statuses

TypeStatus
authentication_error401
permission_error403
invalid_request_error400, 405, 413, 415 and 422
not_found_error404
conflict_error409, 410 and 423
payment_error402
idempotency_errorthe status its code lists below
rate_limit_error429
api_error500 and 503

An object outside your token's account answers exactly as an unknown id does, 404 not_found, so ids from other accounts cannot be probed.

A response you should retry carries Retry-After, in seconds. A 429 also carries the RateLimit-* headers; see Rate limits.

Every error code

The full catalogue, generated from the API contract. Each code links here from the docUrl of its error.

authentication_error4 codes

  • token_expired401Unauthorized

    The API token has expired.

    What to do Make a new token in the panel.

  • token_invalid401Unauthorized

    The API token is not valid.

    What to do Check the token, or make a new one in the panel.

  • token_missing401Unauthorized

    No API token was sent. Send it as Authorization: Bearer <token>.

    What to do Send your token in the Authorization header.

  • token_revoked401Unauthorized

    The API token was revoked.

    What to do Make a new token. If you did not revoke it, review your account's security log.

permission_error6 codes

  • API access is paused for this account.

    What to do Contact support.

  • Ordering through the API is switched off for this account.

    What to do The account owner can switch it on in the panel, under API settings.

  • forbidden403Forbidden

    Your role on this service does not allow this action.

    What to do Ask the account owner for access, or use the owner's token.

  • ip_not_allowed403Forbidden

    This request came from an address outside the token's IP allowlist.

    What to do Call from an allowed address, or change the allowlist in the panel.

  • scope_missing403Forbidden

    This API token does not have the scope this operation needs.

    What to do Make a token with the scope named in the reference for this operation.

  • Only the account owner can pass SSH keys to a reinstall.

    What to do Reinstall without sshKeyIds, or use the owner's token.

invalid_request_error34 codes

  • cursor_invalid400Bad request

    The cursor is malformed, has expired, or belongs to a list with other filters.

    What to do Start the list again without a cursor.

  • invalid_json400Bad request

    The request body is not valid JSON.

    What to do Send a JSON body.

  • metadata_invalid400Bad request

    metadata takes at most 20 keys of up to 40 characters, each with a string value of up to 500 characters.

    What to do Fix the keys or values.

  • parameter_invalid400Bad request

    A field has the wrong type or is out of range.

    What to do Fix the field named in param. The reference gives each field's rules.

  • parameter_missing400Bad request

    A required field is missing.

    What to do Send the field named in param.

  • parameter_unknown400Bad request

    The request has a field this operation does not take.

    What to do Remove the field named in param.

  • version_invalid400Bad request

    Clouduxe-Version does not name an API version.

    What to do Send a version listed in the changelog, or omit the header to use your token's version.

  • method_not_allowed405Method not allowed

    This path does not take this HTTP method.

    What to do Check the method in the reference.

  • request_too_large413Too large

    The request body is larger than 1 MiB.

    What to do Send a smaller body. Upload files through createAttachment.

  • unsupported_media_type415Unsupported media type

    The request body must be application/json.

    What to do Send Content-Type: application/json.

  • attachment_unavailable422Unprocessable

    An attachment is not uploaded, not yours, or already used.

    What to do Upload the file again and pass the new attachmentId.

  • billing_currency_unknown422Unprocessable

    The account has no billing currency yet.

    What to do Add a billing address in the panel.

  • confirmation_mismatch422Unprocessable

    confirm must equal the service's id.

    What to do Send the service's own id in confirm.

  • coupon_invalid422Unprocessable

    This coupon does not exist or does not apply to this order.

    What to do Remove or change couponCode.

  • cycle_unavailable422Unprocessable

    This plan has no orderable price for that billing cycle.

    What to do Pick one of the plan's cycles.

  • department_unavailable422Unprocessable

    This support department is not available.

    What to do Use a department from GET /v1/support/departments.

  • No such firewall preset is available.

    What to do Use a preset from GET /v1/firewall-presets.

  • firewall_rule_limit422Unprocessable

    This server already has 15 firewall rules.

    What to do Remove or merge rules first.

  • firewall_value_refused422Unprocessable

    The protection service refused one of the rule's values.

    What to do Check the rule's limits in the reference.

  • hostname_invalid422Unprocessable

    The hostname must be a valid DNS name of at most 253 characters.

    What to do Send DNS labels of letters, digits and hyphens joined by dots.

  • image_unavailable422Unprocessable

    This OS image is not offered here.

    What to do Use an image from the plan's orderForm, or from GET /v1/services/{serviceId}/images.

  • ip_address_invalid422Unprocessable

    Send one IPv4 address.

    What to do Send a single dotted IPv4 address.

  • ip_is_infrastructure422Unprocessable

    That address serves this server's protection and cannot be blocked or removed.

    What to do No action is possible for this address.

  • ip_is_own_address422Unprocessable

    That is this server's own address.

    What to do Do not block your own server.

  • ip_range_unsupported422Unprocessable

    Address ranges are not supported here. Send one IPv4 address.

    What to do Send single addresses.

  • option_invalid422Unprocessable

    An option is missing, unknown, or not offered on this plan.

    What to do Use the option groups in the plan's orderForm.

  • origin_invalid422Unprocessable

    The proxy origin must be one of this account's own servers.

    What to do Send a service id, or an IPv4 address of one of your servers.

  • plan_change_not_allowed422Unprocessable

    This plan is not an allowed change for this service.

    What to do Pick a plan from GET /v1/services/{serviceId}/plan-options.

  • plan_unavailable422Unprocessable

    This plan cannot be ordered.

    What to do Pick a plan from GET /v1/plans.

  • quote_incomplete422Unprocessable

    The price cannot be fixed until the account's billing details are complete.

    What to do Complete the billing address (for an Indian account, its GST state) in the panel.

  • ssh_key_invalid422Unprocessable

    The public key is not one accepted OpenSSH public key line.

    What to do Send ssh-ed25519, ecdsa-sha2-nistp256, -nistp384 or -nistp521, or ssh-rsa of at least 2048 bits.

  • ssh_key_unknown422Unprocessable

    An SSH key id is not in this account's key library.

    What to do Use ids from GET /v1/ssh-keys.

  • too_many_ssh_keys422Unprocessable

    Too many SSH keys for one request.

    What to do Send at most 10 key ids.

  • webhook_url_refused422Unprocessable

    The webhook URL must be https on port 443 or 8443, with a public DNS name that is not a Clouduxe host.

    What to do Use a public https URL on your own domain.

not_found_error1 code

  • not_found404Not found

    No such object, or it is not visible to this token.

    What to do Check the id, and that the token belongs to the right account.

conflict_error28 codes

  • account_closed409Conflict

    This account is closed.

    What to do No action is possible on a closed account.

  • The paid period has ended, so the cancellation can no longer be undone.

    What to do Order a new service if you need one.

  • coupon_exhausted409Conflict

    This coupon has no uses left.

    What to do Order again without couponCode.

  • The target plan is not offered in this service's currency.

    What to do Open a support ticket.

  • Protection is not set up for this server yet.

    What to do Retry later, or contact support.

  • Every rule of this preset is already covered.

    What to do No action is needed.

  • A rule with this protocol and first port already exists.

    What to do Edit it instead.

  • The rule's ports overlap another rule of the same protocol.

    What to do Edit the existing rule instead.

  • This change would leave no enabled rule while the default policy denies, which blocks every port.

    What to do Enable another rule first, or set the default policy to allow.

  • That address is already on this list.

    What to do No action is needed, or remove it first to change it.

  • out_of_stock409Conflict

    This plan is sold out.

    What to do Pick another plan or region, or try again later.

  • plan_change_open409Conflict

    A plan change for this service is already paid and waiting to be applied.

    What to do Wait for its plan_change action to finish.

  • This service had a plan change request in the last 10 minutes.

    What to do Retry after Retry-After seconds.

  • An earlier plan change is waiting for the server's next power cycle.

    What to do Restart the server, wait for the change to apply, then try again.

  • This service has no protection data to show: it is not a protected server, or protection is not set up yet.

    What to do For a protected proxy, ask support. Otherwise retry once the service is active.

  • A recent reinstall's outcome is unknown, so another is refused for up to 15 minutes.

    What to do Check the server, then retry after Retry-After seconds.

  • A renewal for the next period is already paid, so the plan cannot change through the API.

    What to do Open a support ticket.

  • service_building409Conflict

    A build or reinstall is running on this server.

    What to do Wait for its action to finish.

  • service_ended409Conflict

    This service has ended, so its cancellation cannot change.

    What to do No action is possible on an ended service.

  • This service is still being set up.

    What to do Wait for the service.provisioned event, then retry.

  • This service is already being terminated.

    What to do No action is needed.

  • terms_outdated409Conflict

    Updated terms of service must be accepted before ordering.

    What to do The account owner accepts them in the panel.

  • ticket_closed409Conflict

    This ticket is closed.

    What to do Open a new ticket.

  • This account already has 10 webhook endpoints.

    What to do Delete an endpoint you no longer use.

  • This action's secret was deleted, has expired, was read 5 times, or never existed.

    What to do This is final: do not retry. Reset the password again with delivery api and retrieve it within 60 minutes.

  • This address recently changed hands, and its firewall is being reset.

    What to do Retry in a few minutes.

  • This service is suspended, cancelled or terminated.

    What to do Pay any overdue invoice, or contact support.

  • Actions on this server are paused while its ownership is re-checked.

    What to do Retry later, or contact support.

payment_error2 codes

  • The wallet holds no credit in this order's currency. Credit is never converted.

    What to do Add credit in the order's currency in the panel.

  • Wallet credit in the order's currency does not cover the total. Nothing was ordered.

    What to do Add credit in the panel, then try again.

idempotency_error4 codes

  • Idempotency-Key must be 1 to 128 characters of letters, digits, underscore, dot, colon or hyphen.

    What to do Use a UUID.

  • This request needs an Idempotency-Key header.

    What to do Send a new unique key, such as a UUID, for each logical request.

  • A request with this Idempotency-Key is still running.

    What to do Retry after Retry-After seconds with the same key.

  • idempotency_mismatch422Unprocessable

    This Idempotency-Key was already used with a different request.

    What to do Use a new key for a new request.

rate_limit_error3 codes

  • action_limit_reached429Too many requests

    This service has reached its limit for this action.

    What to do Retry after Retry-After seconds.

  • order_limit_reached429Too many requests

    This account has ordered its hourly maximum of services.

    What to do Retry after Retry-After seconds, or ask support to raise the limit.

  • rate_limited429Too many requests

    Too many requests.

    What to do Retry after Retry-After seconds. The RateLimit headers show the window.

api_error10 codes

  • internal_error500Server error

    An unexpected error occurred. It has been logged with this request id.

    What to do Retry once. If it repeats, contact support with the requestId.

  • actions_unavailable503Unavailable

    Server actions are paused for a moment.

    What to do Retry after Retry-After seconds.

  • files_unavailable503Unavailable

    File storage could not be reached.

    What to do Retry shortly.

  • limits_unavailable503Unavailable

    Rate limits could not be checked, so the change was refused.

    What to do Retry shortly.

  • maintenance503Unavailable

    This kind of change is paused for maintenance. Reads still work.

    What to do Retry after Retry-After seconds.

  • orders_unavailable503Unavailable

    Ordering is paused for a moment. Nothing was ordered.

    What to do Retry after Retry-After seconds.

  • outcome_unknown503Unavailable

    The request may or may not have taken effect.

    What to do Retry with the same Idempotency-Key: the retry answers what happened, or does it once.

  • Plan changes for this service are paused for a moment. Nothing was changed.

    What to do Retry after Retry-After seconds.

  • platform_unavailable503Unavailable

    The server platform could not be reached. Nothing was changed.

    What to do Retry shortly.

  • unavailable503Unavailable

    The API is briefly unavailable.

    What to do Retry after Retry-After seconds.

Need a server, or a hand with one?

Pick a plan to deploy a server, or open a ticket in the panel. Support runs 24/7/365.