UNPKG

@icapps/tree-house-errors

Version:

NodeJS default error definitions with an error parser utility function

15 lines (14 loc) 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.errors = void 0; exports.errors = { GENERIC_ERROR: { code: 'GENERIC_ERROR', i18n: 'internal_error', message: 'An unkown error occurred' }, INTERNAL_ERROR: { code: 'INTERNAL_ERROR', i18n: 'internal_error', message: 'An unkown error occurred' }, INVALID_INPUT: { code: 'INVALID_INPUT', i18n: 'invalid_input', message: 'Invalid input provided' }, AUTHENTICATION_FAILED: { code: 'AUTHENTICATION_FAILED', i18n: 'authentication_failed', message: 'Authentication failed' }, BAD_REQUEST: { code: 'BAD_REQUEST', i18n: 'bad_request', message: 'Bad request' }, MISSING_HEADERS: { code: 'MISSING_HEADERS', i18n: 'missing_headers', message: 'Missing headers' }, UNAUTHORIZED: { code: 'UNAUTHORIZED', i18n: 'unauthorized', message: 'Unauthorized' }, FORBIDDEN: { code: 'FORBIDDEN', i18n: 'forbidden', message: 'No access' }, RESOURCE_NOT_FOUND: { code: 'RESOURCE_NOT_FOUND', i18n: 'resource_not_found', message: 'Resource not found' }, };