MCPcopy Create free account
hub / github.com/angular/angular / onError

Method onError

packages/common/http/src/jsonp.ts:258–270  ·  view source on GitHub ↗
(error: Error)

Source from the content-addressed store, hash-verified

256 // a Javascript error. It emits the error via the Observable error channel as
257 // a HttpErrorResponse.
258 const onError = (error: Error) => {
259 cleanup();
260
261 // Wrap the error in a HttpErrorResponse.
262 observer.error(
263 new HttpErrorResponse({
264 error,
265 status: 0,
266 statusText: 'JSONP Error',
267 url,
268 }),
269 );
270 };
271
272 // Subscribe to both the success (load) and error events on the <script> tag,
273 // and add it to the page.

Callers 1

validateAsyncFunction · 0.80

Calls 2

errorMethod · 0.65
cleanupFunction · 0.50

Tested by

no test coverage detected