feat: classify more HTTP errors as configuration errors in api-client

This commit is contained in:
Fotis Koutoulakis (@NlightNFotis)
2025-03-31 11:54:16 +01:00
parent 3c42562190
commit a022653e2d
6 changed files with 35 additions and 2 deletions

View File

@@ -245,6 +245,9 @@ export function wrapApiConfigurationError(e: unknown) {
if (
e.message.includes("API rate limit exceeded for installation") ||
e.message.includes("commit not found") ||
e.message.includes("Bad credentials") ||
e.message.includes("Not Found") ||
e.message.includes("Resource not accessible by integration") ||
/ref .* not found in this repository/.test(e.message)
) {
return new ConfigurationError(e.message);