@nxtoai/gati
Version:
A flexible Aerospike service for NestJS applications
33 lines (32 loc) • 2.9 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ERROR_MESSAGES = void 0;
exports.ERROR_MESSAGES = {
REDIS_CONNECTION_FAILED: { code: '101', message: 'Failed to connect to Redis', type: 'RedisError' },
REDIS_DISCONNECT_FAILED: { code: '102', message: 'Error disconnecting from Redis', type: 'RedisError' },
INVALID_KEY: { code: '103', message: 'Invalid key provided', type: 'ValidationError' },
INVALID_VALUE: { code: '104', message: 'Invalid value provided', type: 'ValidationError' },
UNKNOWN_ERROR: { code: '105', message: 'An unknown error occurred', type: 'UnknownError' },
KEY_EMPTY: { code: '106', message: 'Key cannot be empty', type: 'ValidationError' },
KEY_NOT_STRING: { code: '107', message: 'Key must be a string', type: 'ValidationError' },
KEY_TOO_LONG: { code: '108', message: 'Key length cannot exceed 255 characters', type: 'ValidationError' },
BINS_EMPTY: { code: '109', message: 'Bins cannot be null or undefined', type: 'ValidationError' },
BINS_NOT_OBJECT: { code: '110', message: 'Bins must be an object', type: 'ValidationError' },
BINS_NO_KEYS: { code: '111', message: 'Bins cannot be empty', type: 'ValidationError' },
BIN_KEY_EMPTY: { code: '112', message: 'Bin key cannot be empty', type: 'ValidationError' },
BIN_KEY_NOT_STRING: { code: '113', message: 'Bin key must be a string', type: 'ValidationError' },
BIN_KEY_TOO_LONG: { code: '114', message: 'Bin key length cannot exceed 14 characters', type: 'ValidationError' },
BIN_VALUE_UNDEFINED: { code: '115', message: 'Bin value cannot be undefined', type: 'ValidationError' },
BIN_VALUE_MAP_SET: { code: '116', message: 'Map and Set are not supported as bin values', type: 'ValidationError' },
BIN_VALUE_UNSUPPORTED_TYPE: { code: '117', message: 'Unsupported data type', type: 'ValidationError' },
ARRAY_TOO_LARGE: { code: '118', message: 'Array size cannot exceed 1,000,000 elements', type: 'ValidationError' },
TTL_NOT_NUMBER: { code: '119', message: 'TTL must be a number', type: 'ValidationError' },
TTL_NEGATIVE: { code: '120', message: 'TTL cannot be negative', type: 'ValidationError' },
TTL_TOO_LARGE: { code: '121', message: 'TTL cannot exceed 10 years (315360000 seconds)', type: 'ValidationError' },
SCAN_OPTIONS_NOT_OBJECT: { code: '122', message: 'Scan options must be an object', type: 'ValidationError' },
SCAN_LIMIT_NOT_NUMBER: { code: '123', message: 'Scan limit must be a number', type: 'ValidationError' },
SCAN_LIMIT_NEGATIVE: { code: '124', message: 'Scan limit cannot be negative', type: 'ValidationError' },
SCAN_TIMEOUT_NOT_NUMBER: { code: '125', message: 'Scan timeout must be a number', type: 'ValidationError' },
SCAN_TIMEOUT_NEGATIVE: { code: '126', message: 'Scan timeout cannot be negative', type: 'ValidationError' },
// Add more as needed
};