fix: error rendering
This commit is contained in:
@@ -21,10 +21,10 @@ function generateGithubToken(GithubApp $source, string $type)
|
||||
|
||||
if ($timeDiff > 0) {
|
||||
throw new \Exception(
|
||||
'System time is out of sync with GitHub API time:'.PHP_EOL.
|
||||
'- System time: '.$serverTime->format('Y-m-d H:i:s').' UTC'.PHP_EOL.
|
||||
'- GitHub time: '.$githubTime->format('Y-m-d H:i:s').' UTC'.PHP_EOL.
|
||||
'- Difference: '.$timeDiff.' seconds'.PHP_EOL.
|
||||
'System time is out of sync with GitHub API time:<br>'.
|
||||
'- System time: '.$serverTime->format('Y-m-d H:i:s').' UTC<br>'.
|
||||
'- GitHub time: '.$githubTime->format('Y-m-d H:i:s').' UTC<br>'.
|
||||
'- Difference: '.$timeDiff.' seconds<br>'.
|
||||
'Please synchronize your system clock.'
|
||||
);
|
||||
}
|
||||
@@ -96,10 +96,10 @@ function githubApi(GithubApp|GitlabApp|null $source, string $endpoint, string $m
|
||||
$remainingCalls = $response->header('X-RateLimit-Remaining', '0');
|
||||
|
||||
throw new \Exception(
|
||||
"GitHub API call failed:\n".
|
||||
"Error: {$errorMessage}\n".
|
||||
"Rate Limit Status:\n".
|
||||
"- Remaining Calls: {$remainingCalls}\n".
|
||||
'GitHub API call failed:<br>'.
|
||||
"Error: {$errorMessage}<br>".
|
||||
'Rate Limit Status:<br>'.
|
||||
"- Remaining Calls: {$remainingCalls}<br>".
|
||||
"- Reset Time: {$resetTime} UTC"
|
||||
);
|
||||
}
|
||||
|
@@ -3,11 +3,11 @@
|
||||
<div>
|
||||
<p class="font-mono font-semibold text-red-500 text-7xl">500</p>
|
||||
<h1 class="mt-4 font-bold tracking-tight dark:text-white">Wait, this is not cool...</h1>
|
||||
<p class="text-base leading-7 text-neutral-300">There has been an error, we are working on it.
|
||||
</p>
|
||||
<p class="text-base leading-7 text-neutral-300">There has been an error, we are working on it.</p>
|
||||
@if ($exception->getMessage() !== '')
|
||||
<code class="mt-6 text-xs text-left text-red-500">Error: {{ $exception->getMessage() }}
|
||||
</code>
|
||||
<div class="mt-6 text-xs text-left text-red-500 whitespace-pre-wrap">
|
||||
Error: {!! nl2br(e($exception->getMessage())) !!}
|
||||
</div>
|
||||
@endif
|
||||
<div class="flex items-center mt-10 gap-x-6">
|
||||
<a href="/">
|
||||
|
Reference in New Issue
Block a user