fix(browser): report cancellation after cleanup and source-map abort
An interrupt during CDP cleanup could still publish the captured page, and a source-map download abort was wrapped as a provider failure. Both now return AnalysisCancelledError for the requested operation.
This commit is contained in:
Vendored
+5
@@ -226,6 +226,11 @@ const serveSourceMap = (
|
||||
response: ServerResponse,
|
||||
options: FakeOptions,
|
||||
): boolean => {
|
||||
if (
|
||||
options.hangSourceMap === true &&
|
||||
request.url?.startsWith("/app.js.map") === true
|
||||
)
|
||||
return true;
|
||||
if (options.sourceMapBody === undefined) return false;
|
||||
if (request.url?.startsWith("/app.js.map") === true) {
|
||||
if (options.sourceMapRedirect !== undefined)
|
||||
|
||||
+2
@@ -93,6 +93,8 @@ export interface FakeOptions {
|
||||
readonly webSocketWithoutFrames?: boolean;
|
||||
readonly invalidBinaryWebSocketEvent?: boolean;
|
||||
readonly sourceMapBody?: string;
|
||||
/** Accept a source-map request and leave the response open. */
|
||||
readonly hangSourceMap?: boolean;
|
||||
readonly sourceMapRedirect?: string;
|
||||
readonly sessionTimeline?:
|
||||
| "same_origin"
|
||||
|
||||
Reference in New Issue
Block a user