---
url: /errors/switch_already_exists.md
---
# `SWITCH_ALREADY_EXISTS`

`SWITCH_ALREADY_EXISTS`

## Description

A switch with the same stored ID already exists.

## HTTP Status

`409 Conflict`

## `doc_url` Format

The `doc_url` value is an absolute URL and changes by environment:

`<docs-base-url>/errors/switch_already_exists`

## Typical Causes

* The create command was retried after a partial success.
* The same write was processed more than once.
* An unexpected ID collision happened during persistence.

## Example

Response:

```json
{
  "errors": [
    {
      "code": "SWITCH_ALREADY_EXISTS",
      "message": "Switch already exists",
      "doc_url": "https://docs.example.com/errors/switch_already_exists"
    }
  ]
}
```

## How To Fix

1. Check whether the switch was already created.
2. Reuse the existing resource if the request was retried.
3. Investigate duplicate processing if this happens unexpectedly.
