gRPC status 6: ALREADY_EXISTS

ALREADY_EXISTS is gRPC status code 6. The entity the client tried to create already exists.

Updated

Usual causes

  • A create call used an ID or unique key that is already taken.
  • A retried create: the first attempt succeeded, the response was lost, and the retry collided with it.

What to check

  1. Whether the entity is the one your earlier attempt created; if so, treat it as success.
  2. Which unique constraint the server enforces for this call.

What it looks like

A typical error, as a Go client prints it: rpc error: code = AlreadyExists desc = project "billing" already exists

Retry, and the HTTP equivalent

ALREADY_EXISTS
Code6
NameALREADY_EXISTS
In istek's status baralready_exists
RetryNo; read the existing entity or choose a new key.
HTTP status409

istek names the status of every call it makes, already_exists included, and explains transport failures in plain words. See istek.

istek, $29 once

macOS 14.0+ · Apple Silicon · no account, no telemetry

Buy istek · $29