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

What Happened?

You called promoteDeployment or rollbackDeployment on a deployment that does not belong to the production environment. Both operations move the app’s current production deployment, so they are only meaningful for production deployments. Preview and other non-production environments do not have a current deployment to move. getDeployment reports the deployment’s environmentId, and availableActions omits promote and rollback for non-production deployments.

How To Fix

  1. Fetch the deployment with getDeployment and inspect availableActions; promote and rollback are only listed for production deployments.
  2. If you meant to act on production, target a deployment in the production environment.
  3. If you are working in a preview environment, promotion and rollback do not apply; deploy directly instead.

Common Mistakes

  • Confusing preview with production: Trying to promote a preview deployment that has no current deployment to move.
  • Wrong deployment id: Passing a non-production deployment id by mistake.
Last modified on July 20, 2026