coollabsio/coolify · info · DeploymentException

69420

69420

Error message

Deployment cancelled by user

What it means

ApplicationDeploymentJob::checkForCancellation() refreshes the application_deployment_queue row and throws DeploymentException with sentinel code 69420 the moment its status is CANCELLED_BY_USER. This is Coolify's cooperative-cancellation mechanism: the UI/API sets the row status, and the job notices it at checkpoints between deployment steps and aborts.

Source

Thrown at app/Jobs/ApplicationDeploymentJob.php:4845

            );
        } catch (Exception $e) {
            $post_deployment_command_output = $this->saved_outputs->get('post-deployment-command-output');
            if ($post_deployment_command_output) {
                $this->application_deployment_queue->addLogEntry('Post-deployment command failed.');
                $this->application_deployment_queue->addLogEntry($post_deployment_command_output, 'stderr');
            }
        }
    }

    /**
     * Check if the deployment was cancelled and abort if it was
     */
    private function checkForCancellation(): void
    {
        $this->application_deployment_queue->refresh();
        if ($this->application_deployment_queue->status === ApplicationDeploymentStatus::CANCELLED_BY_USER->value) {
            $this->application_deployment_queue->addLogEntry('Deployment cancelled by user, stopping execution.');
            throw new DeploymentException('Deployment cancelled by user', 69420);
        }
    }

    /**
     * Transition deployment to a new status with proper validation and side effects.
     * This is the single source of truth for status transitions.
     */
    private function transitionToStatus(ApplicationDeploymentStatus $status): void
    {
        if ($this->isInTerminalState()) {
            return;
        }

        $this->updateDeploymentStatus($status);
        $this->handleStatusTransition($status);
        queue_next_deployment($this->application);
    }

View on GitHub (pinned to 70b9acc424)

Solutions

  1. No fix needed — this is an intentional abort, not a malfunction; confirm in the deployment screen that cancellation was requested.
  2. If deployments show cancelled with nobody clicking Cancel, audit what sets status CANCELLED_BY_USER (API tokens, webhooks, other admins).
  3. Custom orchestration code must compare getCode() === 69420 before treating this as a failure worth alerting or retrying.
Defensive patterns

Strategy: try-catch

Try / catch

try { $job->handle(); } catch (DeploymentException $e) { if ((int) $e->getCode() === 69420) { // user-initiated cancel: mark as cancelled, skip alerting/retry return; } throw $e; }

Prevention

When it happens

Trigger: A user clicks 'Cancel' on an in-flight deployment; an API client PATCHes the deployment queue status to cancelled_by_user; deployment automation supersedes an older run by cancelling it.

Common situations: Long builds cancelled mid-way through build/deploy phases; scripts that cancel rolling deployments before retrying; multiple team members racing on the same application.

Related errors


AI-assisted analysis of coollabsio/coolify@70b9acc424 (2026-08-17). Data as JSON: /api/errors/b40accfd62d78703. Report an issue: GitHub.