From 3e53678c21e45d80b01d9fa1965a94fa3891856a Mon Sep 17 00:00:00 2001 From: Darya Umrikhina Date: Fri, 12 Jul 2024 12:05:54 +0400 Subject: [PATCH] Login:Src:Utils: add error occurrence --- packages/login/src/utils/actions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/login/src/utils/actions.ts b/packages/login/src/utils/actions.ts index 099395744d..c0db237dfe 100644 --- a/packages/login/src/utils/actions.ts +++ b/packages/login/src/utils/actions.ts @@ -155,7 +155,7 @@ export async function getPortalCultures() { const res = await fetch(getPortalCultures); - if (!res.ok) return; + if (!res.ok) throw new Error(res.statusText); const cultures = await res.json(); @@ -212,7 +212,7 @@ export async function getMachineName(confirmKey: string | null = null) { const res = await fetch(getMachineName); - if (!res.ok) return; + if (!res.ok) throw new Error(res.statusText); const machineName = await res.json(); @@ -228,7 +228,7 @@ export async function getIsLicenseRequired() { const res = await fetch(getIsLicenseRequired); - if (!res.ok) return; + if (!res.ok) throw new Error(res.statusText); const isLicenseRequire = await res.json(); @@ -244,7 +244,7 @@ export async function getPortalTimeZones(confirmKey: string | null = null) { const res = await fetch(getPortalTimeZones); - if (!res.ok) return; + if (!res.ok) throw new Error(res.statusText); const portalTimeZones = await res.json();