( provider: string, context?: ErrorFormattingContext )
| 366 | } |
| 367 | |
| 368 | function getServiceUnavailableMessage( |
| 369 | provider: string, |
| 370 | context?: ErrorFormattingContext |
| 371 | ): string { |
| 372 | const endpointLabel = getCustomEndpointLabel(context?.baseURL); |
| 373 | |
| 374 | if (endpointLabel) { |
| 375 | return `The configured API endpoint (${endpointLabel}) is temporarily unavailable.`; |
| 376 | } |
| 377 | |
| 378 | if (context?.baseURL) { |
| 379 | return 'The configured API endpoint is temporarily unavailable.'; |
| 380 | } |
| 381 | |
| 382 | return `The ${provider} service is temporarily unavailable.`; |
| 383 | } |
| 384 | |
| 385 | // Format an error into a user-friendly structure |
| 386 | export function formatUserFriendlyError( |
no test coverage detected
searching dependent graphs…