@piggly/ddd-toolkit
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -12,4 +12,4 @@ "use strict"; | ||
class BusinessRuleViolationError extends DomainError_1.DomainError { | ||
constructor(name, message, hint = 'Try again later.', code = 422) { | ||
super(name, crc_1.default.crc32(name), typeof message === 'string' ? message : message.join(', '), code, typeof hint === 'string' ? hint : hint.join(', ')); | ||
constructor(name, message, hint = 'Try again later.', code = 422, extra) { | ||
super(name, crc_1.default.crc32(name), typeof message === 'string' ? message : message.join(', '), code, typeof hint === 'string' ? hint : hint.join(', '), extra); | ||
} | ||
@@ -16,0 +16,0 @@ } |
@@ -8,6 +8,6 @@ import crc from 'crc'; | ||
export class BusinessRuleViolationError extends DomainError { | ||
constructor(name, message, hint = 'Try again later.', code = 422) { | ||
super(name, crc.crc32(name), typeof message === 'string' ? message : message.join(', '), code, typeof hint === 'string' ? hint : hint.join(', ')); | ||
constructor(name, message, hint = 'Try again later.', code = 422, extra) { | ||
super(name, crc.crc32(name), typeof message === 'string' ? message : message.join(', '), code, typeof hint === 'string' ? hint : hint.join(', '), extra); | ||
} | ||
} | ||
//# sourceMappingURL=BusinessRuleViolationError.js.map |
@@ -7,3 +7,3 @@ import { DomainError } from './DomainError'; | ||
export declare class BusinessRuleViolationError extends DomainError { | ||
constructor(name: string, message: string | string[], hint?: string | string[], code?: number); | ||
constructor(name: string, message: string | string[], hint?: string | string[], code?: number, extra?: Record<string, any>); | ||
} |
{ | ||
"name": "@piggly/ddd-toolkit", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "A bunch of tools to use Model-Driven Design and Domain-Driven Design architecture in a back-end application.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
246191