Rocky_Mountain_Vending/.pnpm-store/v10/files/72/8388fcb30d3b6b3bbb0282afe7b2565666a1794098192bcc8293a3e6e5e41a5cc521b32ad1d721ea786e6cd0a5ec5494784a4943ac8d527afdbc70ad0e227d
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

36 lines
1.1 KiB
Text

/* IMPORT */
import { IS_USER_ROOT } from './constants.js';
/* MAIN */
const Handlers = {
/* API */
isChangeErrorOk: (error) => {
if (!Handlers.isNodeError(error))
return false;
const { code } = error;
if (code === 'ENOSYS')
return true;
if (!IS_USER_ROOT && (code === 'EINVAL' || code === 'EPERM'))
return true;
return false;
},
isNodeError: (error) => {
return (error instanceof Error);
},
isRetriableError: (error) => {
if (!Handlers.isNodeError(error))
return false;
const { code } = error;
if (code === 'EMFILE' || code === 'ENFILE' || code === 'EAGAIN' || code === 'EBUSY' || code === 'EACCESS' || code === 'EACCES' || code === 'EACCS' || code === 'EPERM')
return true;
return false;
},
onChangeError: (error) => {
if (!Handlers.isNodeError(error))
throw error;
if (Handlers.isChangeErrorOk(error))
return;
throw error;
}
};
/* EXPORT */
export default Handlers;