feature-ui/eintrag-per-woche #23

Merged
TorstenHettstedt merged 20 commits from feature-ui/eintrag-per-woche into master 2022-02-28 16:04:31 +01:00
Showing only changes of commit 0813fd637b - Show all commits
+5 -5
View File
@@ -20,7 +20,10 @@
}, },
'_fetch': async (rest_url, request_options) => { '_fetch': async (rest_url, request_options) => {
// noinspection JSUnresolvedVariable // 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) { if (!response.ok) {
throw new Error('Fail!') throw new Error('Fail!')
} }
@@ -40,10 +43,7 @@
}, },
'_pureFetch': async (rest_url, request_options) => { '_pureFetch': async (rest_url, request_options) => {
// noinspection JSUnresolvedVariable // noinspection JSUnresolvedVariable
return await fetch(env.API_URL + rest_url, request_options).catch(err => { return await fetch(env.API_URL + rest_url, request_options)
console.error(err)
return null
})
} }
} }