err:unkey:application:deployment_not_productionExample
What Happened?
You calledpromoteDeployment 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
- Fetch the deployment with
getDeploymentand inspectavailableActions;promoteandrollbackare only listed for production deployments. - If you meant to act on production, target a deployment in the production environment.
- 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.
Related Errors
- err:unkey:application:deployment_no_current - When the app has no current deployment to act over
- err:unkey:application:deployment_is_current - When the target is already the current deployment
- err:unkey:application:deployment_not_ready - When the target deployment cannot serve traffic