coollabsio/coolify · error · RuntimeException

Failed to fetch GitHub app permissions: {$response->body()}

Error message

Failed to fetch GitHub app permissions: {$response->body()}

What it means

Error "Failed to fetch GitHub app permissions: {$response->body()}" thrown in coollabsio/coolify.

Source

Thrown at app/Jobs/GithubAppPermissionJob.php:38

    public function backoff(): int
    {
        return isDev() ? 1 : 3;
    }

    public function __construct(public GithubApp $github_app) {}

    public function handle()
    {
        try {
            $github_access_token = generateGithubJwt($this->github_app);

            $response = Http::withHeaders([
                'Authorization' => "Bearer $github_access_token",
                'Accept' => 'application/vnd.github+json',
            ])->get("{$this->github_app->api_url}/app");

            if (! $response->successful()) {
                throw new \RuntimeException('Failed to fetch GitHub app permissions: '.$response->body());
            }

            $response = $response->json();
            $permissions = data_get($response, 'permissions');

            $this->github_app->contents = data_get($permissions, 'contents');
            $this->github_app->metadata = data_get($permissions, 'metadata');
            $this->github_app->pull_requests = data_get($permissions, 'pull_requests');
            $this->github_app->administration = data_get($permissions, 'administration');

            $this->github_app->save();
            $this->github_app->makeVisible('client_secret')->makeVisible('webhook_secret');

        } catch (\Throwable $e) {
            send_internal_notification('GithubAppPermissionJob failed with: '.$e->getMessage());
            throw $e;
        }
    }

View on GitHub (pinned to 70b9acc424)

When it happens

Trigger: Thrown at app/Jobs/GithubAppPermissionJob.php:38 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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