feat(driver-pwa): friendly toast on 429 (rate-limited code request)

Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
2026-06-18 20:33:46 +10:00
co-authored by claude-flow
parent 479b9699ea
commit adad929769
+5 -1
View File
@@ -30,7 +30,11 @@ export function LoginPage() {
setStep("code"); setStep("code");
} catch (err: unknown) { } catch (err: unknown) {
const status = (err as { response?: { status?: number } })?.response?.status; const status = (err as { response?: { status?: number } })?.response?.status;
toast.error(status === 404 ? "Номер не найден. Обратитесь в парк." : "Не удалось отправить код"); const msg =
status === 404 ? "Номер не найден. Обратитесь в парк." :
status === 429 ? "Слишком часто. Попробуйте позже." :
"Не удалось отправить код";
toast.error(msg);
} finally { } finally {
setBusy(false); setBusy(false);
} }