don't show toast on 404
This commit is contained in:
1 parent
6e58b6a630
commit
5217292125
1 file changed
+6
-1
@@ -20,7 +20,12 @@ const useStatusPagesFetch = () => {
|
|||||||
setStatusPages(res?.data?.data);
|
setStatusPages(res?.data?.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setNetworkError(true);
|
setNetworkError(true);
|
||||||
createToast(error.message, "error");
|
if (error.response.status === 404) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
createToast({
|
||||||
|
body: error.message,
|
||||||
|
});
|
||||||
} finally {
|
} finally {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user