Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ export const AuthTypeSelector = ({
}
})
return () => {
controller.abort('AuthTypeSelector')
controller.abort(
new DOMException(
'Error retrieving valid authentication types',
'AbortError',
),
)
}
}, [baseURL])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,9 @@ const stateModelFactory = (configSchema: ApolloInternetAccountConfigModel) => {
beforeDestroy() {
self.removeBeforeUnloadListener()
self.removeVisibilityChangeListener()
self.controller.abort('internet account beforeDestroy')
self.controller.abort(
new DOMException('Cleaning up Apollo connection', 'AbortError'),
)
self.socket.close()
},
}))
Expand Down
7 changes: 6 additions & 1 deletion packages/jbrowse-plugin-apollo/src/ChangeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ export class ChangeManager {
statusMessage: 'Pre-validating',
progressPct: 0,
cancelCallback: () => {
controller.abort('ChangeManager')
controller.abort(
new DOMException(
`Cancelling change "${change.typeName}"`,
'AbortError',
),
)
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,12 @@ export function AddAssembly({
statusMessage: 'Pre-validating',
progressPct: 0,
cancelCallback: () => {
controller.abort('AddAssembly')
controller.abort(
new DOMException(
`Canceling adding of assembly "${assemblyName}"`,
'AbortError',
),
)
jobsManager.abortJob(job.name)
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,12 @@ export function ImportFeatures({
statusMessage: 'Uploading file, this may take awhile',
progressPct: 0,
cancelCallback: () => {
controller.abort('ImportFeatures')
controller.abort(
new DOMException(
`Canceling importing of features to ${selectedAssembly.displayName}`,
'AbortError',
),
)
jobsManager.abortJob(job.name)
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ export function OntologyTermAutocomplete({
)
}
return () => {
controller.abort('OntologyTermAutocomplete matcher')
controller.abort(
new DOMException(
'Cancel getting current term from ontology store',
'AbortError',
),
)
}
}, [session, valueString, filterTerms, ontologyStore, needToLoadCurrentTerm])

Expand All @@ -119,7 +124,12 @@ export function OntologyTermAutocomplete({
)
}
return () => {
controller.abort('OntologyTermAutocomplete loader')
controller.abort(
new DOMException(
'Canceling getting valid terms from ontology store',
'AbortError',
),
)
}
}, [
needToLoadTermChoices,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ function TermTagWithTooltip({
})

return () => {
controller.abort('TermTagWithTooltip ')
controller.abort(
new DOMException(
'Cancel fetching term description from ontology store',
'AbortError',
),
)
}
}, [termId, ontology, manager])

Expand Down Expand Up @@ -211,7 +216,9 @@ export function OntologyTermMultiSelect({
})

return () => {
aborter.abort('OntologyTermMultiSelect')
aborter.abort(
new DOMException('Cancel getting ontology terms', 'AbortError'),
)
}
}, [getOntologyTerms, ontology, includeDeprecated, inputValue, value])

Expand Down
4 changes: 3 additions & 1 deletion packages/jbrowse-plugin-apollo/src/makeDisplayComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ const ResizeHandle = ({
const controller = new AbortController()
const { signal } = controller
function abortDrag() {
controller.abort('makeDisplayComponent')
controller.abort(
new DOMException('Canceling drag event listener', 'AbortError'),
)
}
globalThis.addEventListener('mousemove', mouseMove, { signal })
globalThis.addEventListener('mouseup', abortDrag, { signal })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,12 @@ export function clientDataStoreFactory(
statusMessage: `Loading ontology "${name}", version "${version}", this may take a while`,
progressPct: 0,
cancelCallback: () => {
controller.abort('ClientDataStore')
controller.abort(
new DOMException(
`Canceling loading of ontology "${name}"`,
'AbortError',
),
)
jobsManager.abortJob(job.name)
},
}
Expand Down
4 changes: 3 additions & 1 deletion packages/jbrowse-plugin-apollo/src/session/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,9 @@ export function extendSession(
)
},
beforeDestroy() {
self.abortController.abort('destroying session model')
self.abortController.abort(
new DOMException('Clean up Apollo session', 'AbortError'),
)
},
}))

Expand Down