Problem
All GitHub API failures return null silently, making it hard to distinguish between auth failures, rate limits, and transient errors.
Current Behavior
File: app/GitHub/ChecksClient.php:90-93
} catch (GuzzleException $e) {
$this->logError('createCheck', $e);
return null;
}
Expected Behavior
Differentiate between error types with specific messages.
Proposed Implementation
} catch (GuzzleException $e) {
if ($e->getCode() === 401) {
throw new \RuntimeException("GitHub token invalid or expired");
}
if ($e->getCode() === 403 && str_contains($e->getMessage(), 'rate limit')) {
throw new \RuntimeException("GitHub API rate limit exceeded");
}
$this->logError('createCheck', $e);
return null;
}
Benefits
- Better error messages for common issues
- Helps users fix auth problems quickly
- Distinguishes between retryable and permanent failures
Problem
All GitHub API failures return null silently, making it hard to distinguish between auth failures, rate limits, and transient errors.
Current Behavior
File:
app/GitHub/ChecksClient.php:90-93Expected Behavior
Differentiate between error types with specific messages.
Proposed Implementation
Benefits