@accounter/client
Version:
Accounter client application
1 lines • 870 B
JavaScript
var e={access_denied:`Login was cancelled or permissions were not granted.`,unauthorized:`Invalid email or password. Please try again.`,too_many_attempts:`Too many login attempts. Your account is temporarily blocked.`,consent_required:`Additional permissions are required to continue.`,login_required:`Please log in to continue.`,invalid_token:`Your session has expired. Please log in again.`},t=new Set([`login_required`,`invalid_token`,`invalid_grant`,`missing_refresh_token`]);function n(e){return e.error!=null&&t.has(e.error)}function r(e){return e.error===`network_error`||e.message?.toLowerCase().includes(`network`)||e.message?.toLowerCase().includes(`fetch`)}function i(t){return t.error&&e[t.error]?e[t.error]:r(t)?`Network error — please check your connection and try again.`:`An unexpected error occurred. Please try again.`}export{n as i,i as n,r,e as t};