diff --git a/features/auth/lib/getOauthProviderList.ts b/features/auth/lib/getOauthProviderList.ts index 6c154bd..40d8b9a 100644 --- a/features/auth/lib/getOauthProviderList.ts +++ b/features/auth/lib/getOauthProviderList.ts @@ -2,8 +2,12 @@ import { api } from "@/shared/api/connector"; const getOauthProviderList = async () => { - const res = await api.get(`auth/providers`); - return res.json(); + try { + const res = await api.get(`auth/providers`); + return res.json(); + } catch (error) { + throw new Error("Failed to fetch OAuth providers", { cause: error }); + } }; export default getOauthProviderList;