# deploy.failed

A deployment failed; the version that was live keeps serving.

- **Level:** error
- **Emitted by:** dispra-cloud
- **When:** When the build fails, or the new version crashes or fails its health check.
- **Message:** `Deployment {dep} of {svc} failed: {error_code}`

## Payload

| Key | Type | Meaning | Example |
|---|---|---|---|
| `svc` | string | The service. See [The service object](https://docs.dispralabs.com/objects/the-service-object.md). | `svc_01jdk3n2f4g6h8j0k2l4z6x8ca` |
| `dep` | string | The deployment. See [The deployment object](https://docs.dispralabs.com/objects/the-deployment-object.md). | `dep_01jdk4p7q9w1e3r5t7y9u1i3ob` |
| `env` | string | The environment. See [The environment object](https://docs.dispralabs.com/objects/the-environment-object.md). | `env_01jdk3m9x5h2p8r4t6y1u3i0oa` |
| `state` | string | failed. | `failed` |
| `error_code` | string | The exact error code, such as DEPLOY_HEALTH_TIMEOUT. See [The deployment object](https://docs.dispralabs.com/objects/the-deployment-object.md). | `DEPLOY_HEALTH_TIMEOUT` |

## Example

```text
17:52:48  error  deploy.failed
  svc="svc_01jdk3n2f4g6h8j0k2l4z6x8ca"
  dep="dep_01jdk4p7q9w1e3r5t7y9u1i3ob"
  env="env_01jdk3m9x5h2p8r4t6y1u3i0oa" state="failed"
  error_code="DEPLOY_HEALTH_TIMEOUT"
```

## Related

- [deploy.lifecycle](https://docs.dispralabs.com/flows/deploy-lifecycle.md)
