mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-20 12:49:32 +00:00
Merge pull request #318 from w3nder/master
Update toastError showing ERROR message
This commit is contained in:
@@ -2,7 +2,7 @@ import { toast } from "react-toastify";
|
|||||||
import { i18n } from "../translate/i18n";
|
import { i18n } from "../translate/i18n";
|
||||||
|
|
||||||
const toastError = err => {
|
const toastError = err => {
|
||||||
const errorMsg = err.response?.data?.error;
|
const errorMsg = err.response?.data?.message || err.response.data.error;
|
||||||
if (errorMsg) {
|
if (errorMsg) {
|
||||||
if (i18n.exists(`backendErrors.${errorMsg}`)) {
|
if (i18n.exists(`backendErrors.${errorMsg}`)) {
|
||||||
toast.error(i18n.t(`backendErrors.${errorMsg}`), {
|
toast.error(i18n.t(`backendErrors.${errorMsg}`), {
|
||||||
|
|||||||
Reference in New Issue
Block a user