MCPcopy
hub / github.com/ampproject/amphtml / isCancellation

Function isCancellation

src/error-reporting.js:254–265  ·  view source on GitHub ↗
(errorOrMessage)

Source from the content-addressed store, hash-verified

252 * @return {boolean}
253 */
254export function isCancellation(errorOrMessage) {
255 if (!errorOrMessage) {
256 return false;
257 }
258 if (typeof errorOrMessage == 'string') {
259 return errorOrMessage.startsWith(CANCELLED);
260 }
261 if (typeof errorOrMessage.message == 'string') {
262 return errorOrMessage.message.startsWith(CANCELLED);
263 }
264 return false;
265}
266
267/**
268 * Returns an error for component blocked by consent

Callers 7

test-resource.jsFile · 0.90
mountInternalMethod · 0.90
inflateAndSendRtc_Method · 0.90
sendRtcCallout_Method · 0.90
promiseErrorHandler_Method · 0.90
initiateSraRequestsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected