diff --git a/frontend/src/errors/toastError.js b/frontend/src/errors/toastError.js index 83fd728..9450764 100644 --- a/frontend/src/errors/toastError.js +++ b/frontend/src/errors/toastError.js @@ -2,7 +2,7 @@ import { toast } from "react-toastify"; import { i18n } from "../translate/i18n"; const toastError = err => { - const errorMsg = err.response?.data?.error; + const errorMsg = err.response?.data?.message || err.response.data.error; if (errorMsg) { if (i18n.exists(`backendErrors.${errorMsg}`)) { toast.error(i18n.t(`backendErrors.${errorMsg}`), {