UNPKG

@codai/memorai

Version:

Universal Database & Storage Service for CODAI Ecosystem - CBD Backend

28 lines 794 B
/** * Universal Types for MEMORAI Database & Storage Service */ export class MemoraiException extends Error { constructor(code, message, details, requestId, userId, appId) { super(message); this.name = 'MemoraiException'; this.code = code; this.details = details; this.timestamp = new Date(); this.requestId = requestId; this.userId = userId; this.appId = appId; } toJSON() { return { code: this.code, message: this.message, details: this.details, stack: this.stack, timestamp: this.timestamp, requestId: this.requestId, userId: this.userId, appId: this.appId }; } } //# sourceMappingURL=types.js.map