diff --git a/ui/src/components/Repositories.svelte b/ui/src/components/Repositories.svelte index edb7440..8f395a3 100644 --- a/ui/src/components/Repositories.svelte +++ b/ui/src/components/Repositories.svelte @@ -20,7 +20,10 @@ }, '_fetch': async (rest_url, request_options) => { // noinspection JSUnresolvedVariable - let response = await MyFetch._pureFetch(rest_url, request_options) + let response = await MyFetch._pureFetch(rest_url, request_options).catch(err => { + console.error(err) + return null + }) if (!response.ok) { throw new Error('Fail!') } @@ -40,10 +43,7 @@ }, '_pureFetch': async (rest_url, request_options) => { // noinspection JSUnresolvedVariable - return await fetch(env.API_URL + rest_url, request_options).catch(err => { - console.error(err) - return null - }) + return await fetch(env.API_URL + rest_url, request_options) } }