export function isServerError(status) {
    return status !== undefined && status >= 500 && status < 600;
}
export function markApiErrorHandled(error) {
    error.apiErrorHandled = true;
}
export function isHandledApiError(reason) {
    if (!reason || typeof reason !== 'object')
        return false;
    const error = reason;
    if (error.apiErrorHandled || error.authErrorHandled)
        return true;
    const status = error.response?.status;
    if (!error.config || status === undefined)
        return false;
    return isServerError(status);
}
/** @deprecated use markApiErrorHandled */
export const markAuthErrorHandled = markApiErrorHandled;
/** @deprecated use isHandledApiError */
export const isHandledAuthError = isHandledApiError;
