debug error handling
This commit is contained in:
@@ -11,7 +11,7 @@ export const errorRequest = (t, notification) => {
|
||||
}
|
||||
|
||||
export const errorResponse = (response, clearToken, t, notification) => {
|
||||
toast.dismiss();
|
||||
if (notification) toast.dismiss();
|
||||
if (isServerError(response.status)) {
|
||||
errorServer(response, t, notification)
|
||||
} else if (isClientError(response.status)) {
|
||||
|
||||
@@ -2,8 +2,8 @@ import SuccessNotification from "@/core/components/notifications/SuccessNotifica
|
||||
import {toast} from "react-toastify";
|
||||
|
||||
export const successRequest = (response, t, options) => {
|
||||
toast.dismiss();
|
||||
if (options.notification && options.success.notification.show) {
|
||||
toast.dismiss();
|
||||
SuccessNotification(t, response.status)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user