From fa5c865f0df0f51eb7f671d276bd5be181ddb487 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Mon, 15 Jul 2024 15:26:48 +0530 Subject: [PATCH] Display error message for multiple requests --- src/pages/SignWithCosmos.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/SignWithCosmos.tsx b/src/pages/SignWithCosmos.tsx index cc45f35..8d18027 100644 --- a/src/pages/SignWithCosmos.tsx +++ b/src/pages/SignWithCosmos.tsx @@ -53,7 +53,8 @@ const SignWithCosmos = () => { }), }); - if (!response.ok) { + if (response.status === 429) { + enqueueSnackbar(response.statusText, { variant: "error" }); throw new Error('Failed to send request'); }