diff --git a/frontend/src/pages/crawls.ts b/frontend/src/pages/crawls.ts index 66b0445a..c9d919ec 100644 --- a/frontend/src/pages/crawls.ts +++ b/frontend/src/pages/crawls.ts @@ -308,7 +308,7 @@ export class Crawls extends LiteElement { try { this.crawls = await this.getCrawls(params); } catch (e: any) { - if (e === ABORT_REASON_THROTTLE) { + if (e.name === "AbortError") { console.debug("Fetch crawls aborted to throttle"); } else { this.notify({ diff --git a/frontend/src/pages/org/collection-detail.ts b/frontend/src/pages/org/collection-detail.ts index 492b229b..cc6042cd 100644 --- a/frontend/src/pages/org/collection-detail.ts +++ b/frontend/src/pages/org/collection-detail.ts @@ -742,7 +742,7 @@ export class CollectionDetail extends LiteElement { try { this.archivedItems = await this.getArchivedItems(params); } catch (e: any) { - if (e === ABORT_REASON_THROTTLE) { + if (e.name === "AbortError") { console.debug("Fetch web captures aborted to throttle"); } else { this.notify({ diff --git a/frontend/src/pages/org/crawls-list.ts b/frontend/src/pages/org/crawls-list.ts index e1017dce..b4aacd64 100644 --- a/frontend/src/pages/org/crawls-list.ts +++ b/frontend/src/pages/org/crawls-list.ts @@ -597,7 +597,7 @@ export class CrawlsList extends LiteElement { try { this.archivedItems = await this.getArchivedItems(params); } catch (e: any) { - if (e === ABORT_REASON_THROTTLE) { + if (e.name === "AbortError") { console.debug("Fetch archived items aborted to throttle"); } else { this.notify({ diff --git a/frontend/src/pages/org/workflows-list.ts b/frontend/src/pages/org/workflows-list.ts index b2f2ece9..c5f86ee0 100644 --- a/frontend/src/pages/org/workflows-list.ts +++ b/frontend/src/pages/org/workflows-list.ts @@ -160,18 +160,16 @@ export class WorkflowsList extends LiteElement { const workflows = await this.getWorkflows(params); this.workflows = workflows; } catch (e: any) { - if (e === ABORT_REASON_THROTTLE) { + if (e.isApiError) { + this.fetchErrorStatusCode = e.statusCode; + } else if (e.name === "AbortError") { console.debug("Fetch archived items aborted to throttle"); } else { - if (e.isApiError) { - this.fetchErrorStatusCode = e.statusCode; - } else { - this.notify({ - message: msg("Sorry, couldn't retrieve Workflows at this time."), - variant: "danger", - icon: "exclamation-octagon", - }); - } + this.notify({ + message: msg("Sorry, couldn't retrieve Workflows at this time."), + variant: "danger", + icon: "exclamation-octagon", + }); } } this.isFetching = false;