MCPcopy
hub / github.com/axios/axios / onabort

Function onabort

lib/helpers/composeSignals.js:16–27  ·  view source on GitHub ↗
(reason)

Source from the content-addressed store, hash-verified

14 let aborted = false;
15
16 const onabort = function (reason) {
17 if (!aborted) {
18 aborted = true;
19 unsubscribe();
20 const err = reason instanceof Error ? reason : this.reason;
21 controller.abort(
22 err instanceof AxiosError
23 ? err
24 : new CanceledError(err instanceof Error ? err.message : err)
25 );
26 }
27 };
28
29 let timer =
30 timeout &&

Callers 1

composeSignalsFunction · 0.85

Calls 2

unsubscribeFunction · 0.85
abortMethod · 0.45

Tested by

no test coverage detected