From 72b9001447521f07dc27e7c706ec8867e8431986 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 9 Apr 2024 11:54:15 +0200 Subject: [PATCH] Fix error message in generate_github_installation_token function --- bootstrap/helpers/github.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/helpers/github.php b/bootstrap/helpers/github.php index 5d759e651..0ae94363b 100644 --- a/bootstrap/helpers/github.php +++ b/bootstrap/helpers/github.php @@ -29,7 +29,7 @@ function generate_github_installation_token(GithubApp $source) 'Accept' => 'application/vnd.github.machine-man-preview+json' ])->post("{$source->api_url}/app/installations/{$source->installation_id}/access_tokens"); if ($token->failed()) { - throw new RuntimeException("Failed to get access token for " . $source->name . " with error: " . $token->json()['message']); + throw new RuntimeException("Failed to get access token for " . $source->name . " with error: " . data_get($token->json(),'message','no error message found')); } return $token->json()['token']; }