Skip to content

Commit

Permalink
chore: change i18next usage
Browse files Browse the repository at this point in the history
  • Loading branch information
gutyerrez committed Aug 26, 2024
1 parent d8c64f5 commit 9fdc51d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ export class Exception {
public readonly name: string;
public readonly message: string | undefined;

constructor(status: number, name: string, message?: string, parameters?: Record<string, string | number>) {
constructor(status: number, name: string, parameters?: Record<string, string | number>, message?: string) {
this.status = status;
this.name = name;
this.message = message ?? i18next.t(name, parameters);
this.message = i18next.t(message ?? name, parameters);
}
}

0 comments on commit 9fdc51d

Please sign in to comment.