# deploy_blocked

> The deploy was blocked by a safety check. Guv stopped this deploy because the Safety Centre found something serious, most often a secret key visible in your built client code.

**The deploy was blocked by a safety check.** Guv stopped this deploy because the Safety Centre found something serious, most often a secret key visible in your built client code. Shipping it would expose the key to every visitor.

- **HTTP status:** `422 Unprocessable Content`
- **CLI exit code:** `3` (forbidden or denied by policy)
- **Retry:** not as it is; the same request will fail the same way until the cause is fixed

## How to fix it

Fix the Safety Centre finding {check_id}, or mark the variable public: true if it is meant to be visible.

1. Open the Safety Centre for the project; the finding names the file and the variable.
2. Move the value to a server-side variable, rotate the key with its provider, then deploy again.

Words in `{braces}` are filled in from the error response, which names the exact resource.

## What the response looks like

```json
{
  "type": "https://guv.dev/errors/deploy_blocked",
  "title": "The deploy was blocked by a safety check",
  "status": 422,
  "code": "deploy_blocked",
  "detail": "Guv stopped this deploy because the Safety Centre found something serious, most often a secret key visible in your built client code.",
  "fix": "Fix the Safety Centre finding {check_id}, or mark the variable public: true if it is meant to be visible.",
  "docs_url": "https://guv.dev/errors/deploy_blocked",
  "request_id": "req_01jbx2m9k7q4r8t5v6w3y0z1rq"
}
```

The `code` field is stable: match on it, not on `title` or `detail`, which may be reworded.
