(error)
| 74423 | const response = error.response; |
| 74424 | if (response?.status === 404) { |
| 74425 | return true; |
| 74426 | } |
| 74427 | } |
| 74428 | } |
| 74429 | return false; |
| 74430 | } |
| 74431 | function isApiKeyError(error) { |
| 74432 | if (error instanceof ApiKeyMissingError) { |
| 74433 | return true; |
| 74434 | } |
| 74435 | if (error instanceof Error) { |
| 74436 | const message = error.message.toLowerCase(); |
| 74437 | if (message.includes("api key") || message.includes("apikey") || message.includes("authentication") || message.includes("unauthorized") || message.includes("invalid_api_key") || message.includes("incorrect api key")) { |
| 74438 | return true; |
| 74439 | } |
| 74440 | if ("response" in error) { |
| 74441 | const response = error.response; |
| 74442 | if (response?.status === 401) { |
| 74443 | return true; |
| 74444 | } |
| 74445 | } |
no test coverage detected
searching dependent graphs…