From e6849c9a32bf75ee9168f2f048a11e10f3d6e3aa Mon Sep 17 00:00:00 2001 From: Johannes Werner Date: Fri, 15 Mar 2024 18:32:31 +0100 Subject: [PATCH] feat(fetch): improve error handling --- src/runtime/utils/fetch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/utils/fetch.ts b/src/runtime/utils/fetch.ts index 2651a539..644c272e 100644 --- a/src/runtime/utils/fetch.ts +++ b/src/runtime/utils/fetch.ts @@ -7,8 +7,8 @@ export const _fetch = async ( path: string, fetchOptions?: Parameters[1] ): Promise => { - const joinedPath = await callWithNuxt(nuxt, () => joinPathToApiURL(path)) try { + const joinedPath = await callWithNuxt(nuxt, () => joinPathToApiURL(path)) return $fetch(joinedPath, fetchOptions) } catch (error) { // TODO: Adapt this error to be more generic