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) { ...@@ -38,7 +38,7 @@ export function useProgramSlots(options: UseProgramOptions) {
})) }))
async function updateProgram() { async function updateProgram() {
if (controller) controller.abort('date changed') if (controller) controller.abort()
error.value = undefined error.value = undefined
controller = new AbortController() controller = new AbortController()
isLoading.value = true isLoading.value = true
...@@ -48,6 +48,7 @@ export function useProgramSlots(options: UseProgramOptions) { ...@@ -48,6 +48,7 @@ export function useProgramSlots(options: UseProgramOptions) {
requestInit: { signal: controller.signal }, requestInit: { signal: controller.signal },
}) })
} catch (e) { } catch (e) {
if (e instanceof DOMException && e.name === 'AbortError') return
error.value = ensureError(e) error.value = ensureError(e)
} finally { } finally {
isLoading.value = false isLoading.value = false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment