diff --git a/src/index.ts b/src/index.ts index 6b36029..e4e32e1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,7 +5,10 @@ export class Exception extends Error { public readonly name: string; constructor(status: number, name: string, parameters?: Record, message?: string) { - super(i18next.t(message ?? name, parameters)); + super(i18next.t(message ?? name, { + defaultValue: name, + ...parameters + })); this.status = status; this.name = name;