UNPKG

naga-audit-service

Version:

A comprehensive audit service library for NestJS applications with MongoDB support

53 lines 1.95 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ERROR_CODE_PREFIX = exports.ERROR_CODES = void 0; const common_1 = require("@nestjs/common"); exports.ERROR_CODES = { SOMETHING_WENT_WRONG: { code: '001', statusCode: common_1.HttpStatus.INTERNAL_SERVER_ERROR, message: 'Something went wrong, please try again.', }, PROBLEM_WITH_REQUEST_PAYLOAD_INVALID_STRING: { code: '002', statusCode: common_1.HttpStatus.BAD_REQUEST, message: 'Problem with the request payload - Invalid String.', }, USER_NOT_FOUND_NAME_REQUIRED: { code: '003', statusCode: common_1.HttpStatus.NOT_FOUND, message: 'User does not exist. Name is required for new users.', }, INVALID_SESSION_ID_USER_NOT_FOUND: { code: '004', statusCode: common_1.HttpStatus.UNAUTHORIZED, message: 'Invalid session ID or user not found.', }, OTP_MISMATCH: { code: '005', statusCode: common_1.HttpStatus.BAD_REQUEST, message: 'OTP mismatch.', }, OTP_EXPIRED: { code: '006', statusCode: common_1.HttpStatus.BAD_REQUEST, message: 'OTP has expired.', }, INVALID_REFRESH_TOKEN: { code: '007', statusCode: common_1.HttpStatus.UNAUTHORIZED, message: 'Invalid refresh token.', }, REFERRAL_CODE_EXISTS: { code: '101', statusCode: common_1.HttpStatus.BAD_REQUEST, message: 'You already have a referral code associated with your account. Please use the existing code or try a different one.', }, SUBSCRIPTION_EXISTS: { code: '101', statusCode: common_1.HttpStatus.BAD_REQUEST, message: 'You already have an active subscription. Referral codes can only be applied if you don\'t have an active subscription.', } }; exports.ERROR_CODE_PREFIX = 'US'; //# sourceMappingURL=error-codes.config.js.map