Skip to main content
err:unkey:application:deployment_is_production
Example

What Happened?

You called startDeployment or stopDeployment on a deployment in the production environment. Neither action applies to production:
  • Production deployments serve live traffic and are never stopped directly; doing so would take the app offline.
  • Because production is never stopped, there is no stopped state to start from.
Production traffic is controlled with promoteDeployment and rollbackDeployment, not start or stop. getDeployment reports the deployment’s environmentId, and availableActions omits both start and stop for production deployments.

How To Fix

  1. Fetch the deployment with getDeployment and inspect availableActions; neither start nor stop is listed for production deployments.
  2. To change what production serves, use promoteDeployment or rollbackDeployment.
  3. The start and stop actions only apply to non-production deployments.

Common Mistakes

  • Trying to take production offline: Using stop on a production deployment instead of promoting or rolling back.
  • Starting production: Using start on a production deployment instead of promoting it.
  • Wrong environment: Passing a production deployment id when you meant a preview one.
Last modified on July 20, 2026