Environment Conflict

environment-conflict · 409

Another environment in this project already has this name, so nothing was written.

conflictField names the field and conflictValue the value it refused.

Besides the members every error carries, this type adds resourceType, conflictField and conflictValue.

Common causes

  • Another environment in this project already uses that name.
  • The same create was sent twice and the first one went through, so the second meets its result.

How to fix the call

  • Read conflictField and conflictValue: together they say which value was refused.
  • Pick another name, or fetch the environment that has it and use that one.
  • If the duplicate is your own retry, treat the call as done, not failed.
  • Send an Idempotency-Key header on writes, so a retry replays the first answer instead of colliding with it.

Example response

json
{
  "type": "environment-conflict",
  "title": "Environment Conflict",
  "detail": "A environment with name 'staging' already exists",
  "resourceType": "Environment",
  "conflictField": "name",
  "conflictValue": "staging",
  "requestId": "req-1785231000000-4f7b2c9ae",
  "timestamp": "2026-07-28T09:30:00.000Z",
  "path": "/v1/projects/0199e0a3-6f21-7c4a-9d18-2b7c5f3ad401/environments",
  "method": "POST",
  "instance": "POST /v1/projects/0199e0a3-6f21-7c4a-9d18-2b7c5f3ad401/environments",
  "status": 409,
  "docs": "https://ghaym.me/docs/errors/environment-conflict"
}