MCPcopy
hub / github.com/di-sukharev/opencommit / getServiceUnavailableMessage

Function getServiceUnavailableMessage

src/utils/errors.ts:368–383  ·  view source on GitHub ↗
(
  provider: string,
  context?: ErrorFormattingContext
)

Source from the content-addressed store, hash-verified

366}
367
368function 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
386export function formatUserFriendlyError(

Callers 1

formatUserFriendlyErrorFunction · 0.70

Calls 1

getCustomEndpointLabelFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…