Documentation

esc
    Databases / Error codes

    Database error codes

    Every code the API returns for databases, their storage and snapshots, attached security groups and a VPS's private network interface, and what to do about each.

    Reading an error

    Every error is a problem document with a stable code; the errors guide explains the shape. Two kinds matter here:

    • A refused request. The API answers with a 4xx or 5xx and nothing changes. For an invalid field the answer is 422 VALIDATION_FAILED, and the field's own code is inside errors:

      JSON
      {
        "status": 422,
        "code": "VALIDATION_FAILED",
        "title": "Validation failed",
        "detail": "One or more fields are invalid.",
        "request_id": "req_…",
        "errors": [
          { "field": "storage_gb", "code": "INVALID_DATABASE_STORAGE",
            "message": "must be at least the plan's disk size (or the zone's minimum), at most the zone's maximum, a multiple of the zone's step above the plan's size, and larger than the current size when resizing" }
        ]
      }
    • A failed operation. The request was accepted (202), but the change could not be made. The operation ends failed, and its failure.code says why (with a readable failure.reason). For a new database the order carries a failure_code too, such as payment_expired (not paid within an hour) or organization_deleted (the organization was deleted first, so the order was cancelled and any payment returned to credit).

    Quote request_id, or the operation's id, to support.

    Creating a database

    Field codes, inside errors on a 422:

    codeFieldMeansWhat to do
    INVALID_DATABASE_NAMEnameNot 1 to 255 charactersShorten it
    INVALID_DATABASE_ENGINEengineNot postgresql, mysql or mariadbUse one of those
    INVALID_DATABASE_VERSIONversionNot a version line offered for the enginePick one from GET /database-engines
    INVALID_DATABASE_ZONEzone_idNot a zone your organization can useUse af-abj-1 or af-abj-2
    DATABASE_VERSION_NOT_AVAILABLE_IN_ZONEzone_idThat version cannot be created in that zone yetCheck the version's zones in the catalogue
    PLAN_NOT_FOUNDplan_slugNot an active planPick one from GET /plans
    DATABASE_SUBNET_REQUIREDsubnet_idA database in af-abj-2 needs a subnetSend the subnet's id
    DATABASE_SUBNET_NOT_ALLOWEDsubnet_idA database in af-abj-1 takes no subnetLeave subnet_id out
    DATABASE_SUBNET_NOT_FOUNDsubnet_idNot one of your subnetsCheck the id
    DATABASE_SUBNET_WRONG_ZONEsubnet_idThe subnet is in another zoneUse a subnet in zone_id
    DATABASE_SUBNET_NOT_USABLEsubnet_idThe subnet is being deleted or has failedUse another subnet
    INVALID_DATABASE_ADMIN_USERNAMEadmin_usernameNot 3 to 32 lowercase letters, digits and underscores starting with a letter, or a reserved nameChoose another; see create
    INVALID_DATABASE_PASSWORDpasswordNot 16 to 128 printable characters, or contains a space, quote or backslashSee the rules
    INVALID_DATABASE_STORAGEstorage_gbSmaller than the plan's disk, over 2,000 GB, or off the 10 GB stepSee allowed sizes
    INVALID_ACCESS_RULEaccess_rulesNot an IPv4 CIDR, wider than a /8, or 0.0.0.0/0Narrow it
    TOO_MANY_ACCESS_RULESaccess_rulesMore than 50Use wider ranges, or a security group
    DUPLICATE_ACCESS_RULEaccess_rulesThe same CIDR twiceRemove the repeat

    Other refusals:

    codeStatusMeansWhat to do
    INSUFFICIENT_CREDIT402Not enough credit, and no card for the upfront paymentAdd funds or a card
    DATABASE_NAME_TAKEN409You already have a database with that nameChoose another
    ACCOUNT_SUSPENDED409An invoice is overduePay it; nothing new can be created until then
    IDEMPOTENCY_CONFLICT409The Idempotency-Key was used for a different requestUse a new key
    DATABASE_HOSTNAME_UNAVAILABLE503A hostname could not be reservedRetry with a new Idempotency-Key
    DATABASE_STORAGE_UNAVAILABLE503Database storage is not offered in that zone yetTry later, or the other zone
    DATABASES_UNAVAILABLE503Databases are not available right nowTry again later

    An order can also end payment_failed or failed after it was accepted: see why an order failed.

    Reading and changing a database

    codeStatusMeansWhat to do
    DATABASE_NOT_FOUND404No database of yours has that idCheck the id and the API key's organization
    RESOURCE_NOT_FOUND404The id is not a database id at all (db_…)Check the path
    DATABASE_ORDER_NOT_FOUND404No order of yours has that idCheck the id
    DATABASE_NOT_RUNNING409The change needs the database running: a password change, a reset, or a storage resizeStart it, wait for running, retry
    DATABASE_NOT_STOPPED409The change needs it stoppedStop it first
    INVALID_RESOURCE_STATE409It is being deleted, or has beenNothing more can be changed on it
    CONCURRENT_UPDATE409It changed while the request was being handledRetry the same request
    DATABASE_ACCESS_RANGE_LIMIT_EXCEEDED422Its rules plus its security groups' ranges would exceed 1,024Remove some ranges

    Security groups on a database

    From PUT /databases/{database_id}/security-groups. Field codes, on security_group_ids:

    codeMeansWhat to do
    INVALID_DATABASE_SECURITY_GROUPSMore than 5 groups, or one listed twiceSend at most 5 distinct ids
    DATABASE_SECURITY_GROUP_NOT_FOUNDNot one of your security groupsCheck the ids
    DATABASE_SECURITY_GROUP_WRONG_ZONEThe group is in another zoneAttach groups from the database's zone
    DATABASE_SECURITY_GROUP_NOT_USABLEThe group is being deleted, or failedUse another group

    From the security group's side:

    codeStatusMeansWhat to do
    SECURITY_GROUP_ATTACHED_TO_DATABASE409Deleting a group a database uses; detail names the databaseDetach it from that database first
    DATABASE_ACCESS_RANGE_LIMIT_EXCEEDED422, on rulesA rule change would give an attached database more than 1,024 rangesUse fewer, wider ranges

    A rule of an attached group that does not apply to the database is not an error: it is listed in the database's ignored_security_group_rules with a reason.

    Storage

    From POST /databases/{database_id}/resize-storage:

    codeStatusMeansWhat to do
    INVALID_DATABASE_STORAGE422, on storage_gbNot larger than the current size, over 2,000 GB, or not a multiple of 10Pick a valid size
    DATABASE_NOT_RUNNING409The database is stoppedStart it first
    DATABASE_STORAGE_RESIZE_IN_PROGRESS409A resize is already runningWait for it, then retry
    ACCOUNT_SUSPENDED, ACCOUNT_NOT_ACTIVE409The account cannot take on new chargesSettle billing first
    DATABASE_STORAGE_UNAVAILABLE503Storage changes are not offered in that zone yetTry later

    A resize operation can fail with:

    failure.codeMeansWhat to do
    DATABASE_STORAGE_RESIZE_FAILEDThe disk could not be grown. Nothing changedRetry; contact support if it repeats
    DATABASE_STORAGE_GROW_FAILEDThe disk grew, but the filesystem could not be, or the database could not be reached. Size and bill unchangedCheck it is running, then retry the same size

    Snapshots

    From database snapshots:

    codeStatusMeansWhat to do
    INVALID_DATABASE_SNAPSHOT_NAME422, on nameEmpty, or over 255 charactersFix the name
    DATABASE_SNAPSHOT_NAME_TAKEN409The database already has a snapshot of that nameChoose another
    DATABASE_SNAPSHOT_NOT_READY409The database is not running or stopped: it is being created, changing state, or being deletedWait for it to settle
    DATABASE_SNAPSHOT_NOT_FOUND404No snapshot of this database has that idCheck both ids; a snapshot of a volume or a machine is not under a database
    ACCOUNT_SUSPENDED409The account cannot take on new chargesSettle billing first

    A VPS's private network interface

    From POST and DELETE /instances/{instance_id}/private-network:

    codeStatusMeansWhat to do
    SECURITY_GROUP_ALLOWS_PRIVATE_NETWORK409The VPS's security group admits some of 10.250.0.0/20; detail names the rulesNarrow them
    PRIVATE_NETWORK_NOT_AVAILABLE409The VPS is in a VPC, or its zone has no database networkOnly for standard VPSes in af-abj-1
    NOT_FOUND404Private network interfaces are not offered on this platform yetTry again later
    INSTANCE_NOT_SETTLED409The VPS is starting, stopping, resizing, restoring or being deletedWait until it is running or stopped
    PRIVATE_NETWORK_ALREADY_ATTACHED409It has the interface, or one is being addedNothing to do
    PRIVATE_NETWORK_NOT_ATTACHED409Removing an interface it does not haveNothing to do
    PRIVATE_NETWORK_CHANGE_IN_PROGRESS409An attach or detach is still runningFollow that operation
    ACCOUNT_SUSPENDED409Attaching from a suspended accountPay the overdue invoice; detaching is always allowed

    While a VPS has the interface, its security group is held to the same rule:

    codeStatusMeans
    RULE_ALLOWS_PRIVATE_NETWORK422, on rulesA rule change on the group would admit 10.250.0.0/20
    SECURITY_GROUP_ALLOWS_PRIVATE_NETWORK422, on security_group_idMoving the VPS to a group that admits it

    An attach or detach operation can fail with:

    failure.codeMeansWhat to do
    SECURITY_GROUP_ALLOWS_PRIVATE_NETWORKThe group's rules changed to admit the range before the interface was added. Nothing was addedNarrow them, then retry
    INSTANCE_BUSYThe VPS stayed busy with another changeRetry with a new Idempotency-Key
    INSTANCE_PRIVATE_NETWORK_ATTACH_FAILEDThe interface could not be added. Nothing changedRetry; contact support if it repeats
    INSTANCE_PRIVATE_NETWORK_DETACH_FAILEDThe interface could not be removed. It is still attachedRetry

    Operations on a database

    Other failure.codes a database operation can end with:

    failure.codeMeansWhat to do
    DATABASE_DEPLOY_FAILED, DATABASE_SETUP_TIMED_OUTA new database could not be built. Its order ends failed and the payment returns to your creditOrder again
    DATABASE_START_FAILED, DATABASE_STOP_FAILEDA power change did not completeRetry
    DATABASE_DELETE_FAILEDDeletion did not completeRetry the delete
    DATABASE_NOT_READY, DATABASE_GUEST_COMMAND_FAILED, DATABASE_GUEST_RETRIES_EXHAUSTEDA change inside the database (access rules, a password, storage) could not be applied; the database kept its previous settingsCheck it is running, then retry
    DATABASE_EFFECTIVE_RULES_EXCEEDEDThe allow-list came to more than 1,024 ranges, so nothing was changedRemove ranges from its rules or groups
    DATABASE_PASSWORD_LOSTA password change could not be completed and its password is goneReset the password
    DATABASE_DELETEDThe database was deleted while the change was waitingNothing to do
    PROVISIONING_CAPACITY_UNAVAILABLE, PROVISIONING_ADDRESSES_EXHAUSTED, PROVISIONING_IMAGE_UNAVAILABLEThe zone had no room, address or image for it right nowTry another plan or zone, or try again later
    PROVISIONING_LIMIT_EXCEEDEDYour account reached a limitDelete what you no longer use, or contact support
    PROVISIONING_RESOURCE_BUSY, PROVISIONING_UNAVAILABLEThe platform was busy or briefly unavailableRetry in a few minutes
    PROVISIONING_RESOURCE_CONFLICT, PROVISIONING_RESOURCE_NOT_FOUND, PROVISIONING_INVALID_REQUEST, PROVISIONING_INTERNAL_ERROR, PROVISIONING_FAILEDThe platform could not make the change. See every provisioning codeFollow failure.reason; contact support with the operation id if it repeats

    New codes may be added. Treat one you do not know by its HTTP status, or as a failed operation you can retry.

    Was this page helpful?

    Updated