feature-ui/eintrag-per-woche #23
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user