UNPKG

@logistically/events

Version:

A production-ready event-driven architecture library for NestJS with Redis Streams, comprehensive batching, reliable consumption, and enterprise-grade features.

41 lines (40 loc) 1.62 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ContextForbiddenException = exports.ContextNotFoundException = exports.ContextUnauthorizedException = exports.ContextBadRequestException = exports.ContextException = void 0; class ContextException extends Error { constructor(translationContext, statusCode = 400) { super(translationContext.key); this.translationContext = translationContext; this.statusCode = statusCode; this.name = 'ContextException'; } } exports.ContextException = ContextException; class ContextBadRequestException extends ContextException { constructor(translationContext) { super(translationContext, 400); this.name = 'ContextBadRequestException'; } } exports.ContextBadRequestException = ContextBadRequestException; class ContextUnauthorizedException extends ContextException { constructor(translationContext) { super(translationContext, 401); this.name = 'ContextUnauthorizedException'; } } exports.ContextUnauthorizedException = ContextUnauthorizedException; class ContextNotFoundException extends ContextException { constructor(translationContext) { super(translationContext, 404); this.name = 'ContextNotFoundException'; } } exports.ContextNotFoundException = ContextNotFoundException; class ContextForbiddenException extends ContextException { constructor(translationContext) { super(translationContext, 403); this.name = 'ContextForbiddenException'; } } exports.ContextForbiddenException = ContextForbiddenException;