From 79f51f6b28d6c026d6eacbc821cf86fed3e27aac Mon Sep 17 00:00:00 2001 From: gabriellsh <40830821+gabriellsh@users.noreply.github.com> Date: Fri, 8 Jan 2021 00:43:35 -0300 Subject: [PATCH] [FIX] Meteor errors not translating for toast messages (#19993) --- app/utils/client/lib/handleError.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/client/lib/handleError.js b/app/utils/client/lib/handleError.js index 9e1ac011c62..20cb63f7dd6 100644 --- a/app/utils/client/lib/handleError.js +++ b/app/utils/client/lib/handleError.js @@ -23,7 +23,7 @@ export const handleError = function(error, useToastr = true) { } const details = Object.entries(error.details || {}) .reduce((obj, [key, value]) => ({ ...obj, [key]: escapeHTML(value) }), {}); - const message = TAPi18n.__(error.message || error.error, details); + const message = TAPi18n.__(error.error || error.message, details); const title = details.errorTitle && TAPi18n.__(details.errorTitle); return toastr.error(message, title);