Skip to content

Commit

Permalink
Merge pull request #11814 from nanaya/adjust-github-error-message
Browse files Browse the repository at this point in the history
Fix handling of github 404 error
  • Loading branch information
peppy authored Jan 27, 2025
2 parents 7c100f9 + 5182ac6 commit 479a9d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Libraries/OsuWiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private function fetch(): array
} catch (GithubException $e) {
$message = $e->getMessage();

if ($message === 'Not Found') {
if ($e->getCode() === 404) {
throw new GitHubNotFoundException($message);
} elseif (starts_with($message, 'This API returns blobs up to 1 MB in size.')) {
throw new GitHubTooLargeException($message);
Expand Down

0 comments on commit 479a9d9

Please sign in to comment.