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:
hamed
2026-06-15 18:25:11 +03:30
co-authored by Claude Opus 4.8
parent 08f5829a22
commit 9912ae06ca
4 changed files with 26 additions and 13 deletions
@@ -103,7 +103,6 @@ function SendReq({
.catch(() => {
setLoading(false);
setIsError(true);
toast.error("دریافت اطلاعات کاربر ناموفق بود. دوباره تلاش کنید.");
});
};