fix(capture): retain Electron observations and HAR resource failures

This commit is contained in:
morluto
2026-10-09 06:49:02 +08:00
parent 6c13fc8e0a
commit 44fd18305f
27 changed files with 1462 additions and 145 deletions
+3 -1
View File
@@ -96,7 +96,7 @@ export const analysisErrorCategory = (
if (error._tag === "ProcessCaptureError")
return error.userCategory ?? "execution_failure";
if (error instanceof BrowserObservationError)
return browserErrorCategory(error.reason);
return error.userCategory ?? browserErrorCategory(error.reason);
if (
error instanceof HopperRemoteError &&
error.diagnosticType === "invalid_request"
@@ -117,6 +117,8 @@ export const analysisErrorCategory = (
const browserErrorCategory = (
reason: BrowserObservationError["reason"],
): AnalysisErrorProjection["category"] => {
if (reason === "cancelled") return "cancelled";
if (reason === "timeout") return "timeout";
if (reason === "payload_limit") return "truncated";
if (
reason === "target_not_found" ||