• Gets a user-friendly message for a recovery action.

    Parameters

    Returns string

    A user-friendly message describing what the user should do.

    export function getRecoveryActionMessage(action: ErrorRecoveryAction): string {
    switch (action) {
    case ErrorRecoveryAction.RETRY:
    return "Tap 'Retry' to try this operation again";
    case ErrorRecoveryAction.CHECK_CONNECTION:
    return "Check your internet connection and try again";
    case ErrorRecoveryAction.REFRESH_TOKEN:
    return "Your session has expired. Please log in again.";
    case ErrorRecoveryAction.WAIT_RATE_LIMIT:
    return "Too many requests. Please wait a moment and try again.";
    case ErrorRecoveryAction.CONTACT_SUPPORT:
    return "Please contact support for assistance.";
    case ErrorRecoveryAction.NONE:
    default:
    return "";
    }
    }