Feature/faaliyat rozane cartable
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
import { toast } from "react-toastify";
|
||||
import {
|
||||
errorAccessDeniedToast,
|
||||
errorClientToast,
|
||||
errorLogicToast,
|
||||
errorServerToast,
|
||||
@@ -22,6 +23,9 @@ const errorClient = (response, notification, toastContainer, logout) => {
|
||||
logout();
|
||||
if (notification) errorUnauthorizedToast(toastContainer);
|
||||
break;
|
||||
case 403:
|
||||
if (notification) errorAccessDeniedToast(response.data.message, toastContainer);
|
||||
break;
|
||||
case 422:
|
||||
if ("type" in response.data) {
|
||||
if (Array.isArray(response.data.message)) {
|
||||
|
||||
Reference in New Issue
Block a user