All error codes

ssh_key_name_taken

HTTP 409 An SSH key with this name already exists

What happened

You already have a key with this name and different key material, or a key whose name differs from yours only in letter case or accents (deploy and Deploy, cafe and café) - key names in the pool are compared that way, and the detail then names the existing key. The same name, spelled exactly the same, with the same material is not an error - it returns the existing key with 200.

What to do

If the detail names an existing key spelled differently and that key is the one you meant, use its exact name. Otherwise send the new key under a different name, or delete the existing key with DELETE /v1/ssh-keys/{id} and repeat the same request with the same idempotency key. Keys cannot be renamed or edited, and the platform will not overwrite the existing key silently.

Retrying

Change the state this refers to, then repeat the same request with the same idempotency key.

How it arrives

{
    "type": "https://docs.fiberax.com/errors/ssh_key_name_taken",
    "title": "An SSH key with this name already exists",
    "status": 409,
    "code": "ssh_key_name_taken",
    "request_id": "a277dcd1ca652c65"
}

Branch your code on code, never on the wording of title.