Update exception type in generate_github_installation_token function
This commit is contained in:
parent
1cbfd03912
commit
843cd90ee5
@ -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 \Exception("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: " . $token->json()['message']);
|
||||
}
|
||||
return $token->json()['token'];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user