From 9fdc51d5669d279d0d59fe7b3a648c4f548c65e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Gutierrez?= Date: Mon, 26 Aug 2024 12:01:07 -0300 Subject: [PATCH] chore: change i18next usage --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 21bd751..d35f5f0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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) { + constructor(status: number, name: string, parameters?: Record, message?: string) { this.status = status; this.name = name; - this.message = message ?? i18next.t(name, parameters); + this.message = i18next.t(message ?? name, parameters); } }