fix too many errors in chrome (#1130)

This commit is contained in:
sua yoo 2023-09-05 18:36:40 -07:00 committed by GitHub
parent 93573d0bfe
commit 0cad649ab9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 13 deletions

View File

@ -308,7 +308,7 @@ export class Crawls extends LiteElement {
try { try {
this.crawls = await this.getCrawls(params); this.crawls = await this.getCrawls(params);
} catch (e: any) { } catch (e: any) {
if (e === ABORT_REASON_THROTTLE) { if (e.name === "AbortError") {
console.debug("Fetch crawls aborted to throttle"); console.debug("Fetch crawls aborted to throttle");
} else { } else {
this.notify({ this.notify({

View File

@ -742,7 +742,7 @@ export class CollectionDetail extends LiteElement {
try { try {
this.archivedItems = await this.getArchivedItems(params); this.archivedItems = await this.getArchivedItems(params);
} catch (e: any) { } catch (e: any) {
if (e === ABORT_REASON_THROTTLE) { if (e.name === "AbortError") {
console.debug("Fetch web captures aborted to throttle"); console.debug("Fetch web captures aborted to throttle");
} else { } else {
this.notify({ this.notify({

View File

@ -597,7 +597,7 @@ export class CrawlsList extends LiteElement {
try { try {
this.archivedItems = await this.getArchivedItems(params); this.archivedItems = await this.getArchivedItems(params);
} catch (e: any) { } catch (e: any) {
if (e === ABORT_REASON_THROTTLE) { if (e.name === "AbortError") {
console.debug("Fetch archived items aborted to throttle"); console.debug("Fetch archived items aborted to throttle");
} else { } else {
this.notify({ this.notify({

View File

@ -160,11 +160,10 @@ export class WorkflowsList extends LiteElement {
const workflows = await this.getWorkflows(params); const workflows = await this.getWorkflows(params);
this.workflows = workflows; this.workflows = workflows;
} catch (e: any) { } catch (e: any) {
if (e === ABORT_REASON_THROTTLE) {
console.debug("Fetch archived items aborted to throttle");
} else {
if (e.isApiError) { if (e.isApiError) {
this.fetchErrorStatusCode = e.statusCode; this.fetchErrorStatusCode = e.statusCode;
} else if (e.name === "AbortError") {
console.debug("Fetch archived items aborted to throttle");
} else { } else {
this.notify({ this.notify({
message: msg("Sorry, couldn't retrieve Workflows at this time."), message: msg("Sorry, couldn't retrieve Workflows at this time."),
@ -173,7 +172,6 @@ export class WorkflowsList extends LiteElement {
}); });
} }
} }
}
this.isFetching = false; this.isFetching = false;
// Restart timer for next poll // Restart timer for next poll