Skip to content

Commit

Permalink
Ajuste na validação do toastError
Browse files Browse the repository at this point in the history
  • Loading branch information
rtenorioh committed Oct 16, 2024
1 parent fc4e30f commit 68d9c80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/errors/toastError.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { toast } from "react-toastify";
import { i18n } from "../translate/i18n";

const toastError = err => {
const errorMsg = err.response?.data?.message || 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}`), {
Expand Down

0 comments on commit 68d9c80

Please sign in to comment.