feat(driver-pwa): friendly toast on 429 (rate-limited code request)
Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user