fix: error rendering

This commit is contained in:
peaklabs-dev
2025-01-06 17:49:55 +01:00
parent 503d2b4866
commit a29547b3ba
2 changed files with 13 additions and 13 deletions

View File

@@ -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,11 +96,11 @@ 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".
"- Reset Time: {$resetTime} UTC"
'GitHub API call failed:<br>'.
"Error: {$errorMessage}<br>".
'Rate Limit Status:<br>'.
"- Remaining Calls: {$remainingCalls}<br>".
"- Reset Time: {$resetTime} UTC"
);
}