Skip to content
Snippets Groups Projects
Commit 7b486543 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

fix(Calendar): remove invalid error message for aborted requests

We abort requests if the underlying request data has changed, so there
is no need to handle the resulting AbortError instances as actual
errors.

refs #304
parent 87dffc64
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,7 @@ export function useProgramSlots(options: UseProgramOptions) {
}))
async function updateProgram() {
if (controller) controller.abort('date changed')
if (controller) controller.abort()
error.value = undefined
controller = new AbortController()
isLoading.value = true
......@@ -48,6 +48,7 @@ export function useProgramSlots(options: UseProgramOptions) {
requestInit: { signal: controller.signal },
})
} catch (e) {
if (e instanceof DOMException && e.name === 'AbortError') return
error.value = ensureError(e)
} finally {
isLoading.value = false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment