diff --git a/plugins/cicd-statistics/src/apis/types.ts b/plugins/cicd-statistics/src/apis/types.ts index 5392657a64..48cb58e350 100644 --- a/plugins/cicd-statistics/src/apis/types.ts +++ b/plugins/cicd-statistics/src/apis/types.ts @@ -163,7 +163,7 @@ export interface CicdConfiguration { /** * If the Api implements support for aborting the fetching of builds, throw an - * AbortError of this type + * AbortError of this type (or any other error with name === 'AbortError'). */ export class AbortError extends Error {} diff --git a/plugins/cicd-statistics/src/entity-page.tsx b/plugins/cicd-statistics/src/entity-page.tsx index d339f52fde..28c08f2371 100644 --- a/plugins/cicd-statistics/src/entity-page.tsx +++ b/plugins/cicd-statistics/src/entity-page.tsx @@ -35,7 +35,7 @@ import { getDefaultViewOptions, ViewOptions, } from './components/chart-filters'; -import { AbortError, CicdConfiguration } from './apis'; +import { CicdConfiguration } from './apis'; import { cleanupBuildTree } from './utils/stage-names'; import { renderFallbacks, useAsyncChain } from './components/progress'; @@ -131,7 +131,7 @@ function CicdCharts(props: CicdChartsProps) { useEffect(() => { if ( !chartableStagesState.error || - chartableStagesState.error instanceof AbortError + chartableStagesState.error?.name === 'AbortError' ) { return; }