fix(api): suppress toast notifications on handled 404 responses
This commit is contained in:
1 parent
f22238d6c7
commit
6b566e9a51
1 file changed
+2
-2
@@ -57,8 +57,8 @@ api.interceptors.response.use(
|
||||
}
|
||||
}
|
||||
|
||||
// Show formatted Farsi toast if not explicitly suppressed
|
||||
if (!error.config?.hideErrorToast) {
|
||||
// Show formatted Farsi toast if not explicitly suppressed and not 404
|
||||
if (!error.config?.hideErrorToast && status !== 404) {
|
||||
if (responseData?.details && Array.isArray(responseData.details) && responseData.details.length > 0) {
|
||||
const firstDetailMessage = responseData.details[0]?.message || farsiMessage;
|
||||
toast.error(firstDetailMessage);
|
||||
|
||||
Reference in new issue
Block a user