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

What Happened?

You tried to promote or roll back to a deployment that cannot serve traffic. A deployment is only eligible once it has finished building and reached ready status. This error is returned in two cases:
  • The deployment never reached ready status (it is still building, or it failed, was skipped, or was superseded).
  • The deployment reached ready but is now shutting down after being demoted, so routing it live again would send traffic to a deployment that is going away.
getDeployment reports the current status, and availableActions omits promote and rollback while a deployment is in either state.

How To Fix

  1. Fetch the deployment with getDeployment and check its status.
  2. If it is still building, wait for ready and retry.
  3. If it failed, inspect the error object for the reason, fix the underlying issue, and create a new deployment.
  4. If status is ready but promote or rollback is not listed in availableActions, the deployment is shutting down; pick a different one.

Common Mistakes

  • Promoting before the build finishes: Acting on a deployment that is still building instead of waiting for ready.
  • Ignoring availableActions: Calling promote or rollback when the action is not listed for the current state.
  • Reusing a demoted deployment: Routing live traffic back onto a deployment that is already shutting down.
Last modified on July 20, 2026