feat(api): surface backend error messages globally via toast
Show the backend's Persian error (errors[0].message, e.g. rate-limit 'درخواستهای زیاد') as a toast for any failed request.* call, from the axios response interceptor — so failures are no longer silent. 401 still logs out/redirects without a toast; callers can opt out with config.skipErrorToast. Drop now-redundant per-caller alerts/toasts in the booking submit, payment, and OTP userinfo paths. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -103,7 +103,6 @@ function SendReq({
|
||||
.catch(() => {
|
||||
setLoading(false);
|
||||
setIsError(true);
|
||||
toast.error("دریافت اطلاعات کاربر ناموفق بود. دوباره تلاش کنید.");
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user