MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / getApiOrConnectionErrorMessage

Function getApiOrConnectionErrorMessage

src/utils/api-error-message.ts:163–171  ·  view source on GitHub ↗
(
  error: unknown,
  fallback: string,
)

Source from the content-addressed store, hash-verified

161 * `Request failed: ...` text.
162 */
163export function getApiOrConnectionErrorMessage(
164 error: unknown,
165 fallback: string,
166): string {
167 if (hasApiErrorResponse(error)) {
168 return getApiErrorMessage(error, fallback);
169 }
170 return getUserFacingConnectionErrorMessage(error) || fallback;
171}

Callers 3

displayApiErrorToastFunction · 0.90
useSwitchLlmProfileFunction · 0.90

Calls 3

hasApiErrorResponseFunction · 0.85
getApiErrorMessageFunction · 0.85

Tested by

no test coverage detected