CupThread React Native & Expo SDK - v0.1.0
    Preparing search index...

    Function userFacingErrorMessage

    • Maps a caught error to a safe, localized string suitable for rendering to end users.

      Transport-level exceptions embed technical detail in their message (timeouts, URLs, parse failures) and are replaced by localized common strings. Every other error — including UnexpectedStatusException, which no longer carries the raw response body in its message — falls back to the caller's surface-specific localized string (e.g. strings.comments.postFailed), so raw server payloads and English-only internals never bypass i18n on screen.

      Host developers retain full diagnostics on the error object itself (err.message, err.status, err.responseBody).

      Parameters

      • err: unknown

        The caught error (unknown-safe).

      • fallback: string

        Localized fallback string for the failing surface.

      • common: CommonStrings

        The active locale's common dictionary.

      Returns string

      A localized, user-safe error message.