Skip to content

Commit

Permalink
Log browser crash
Browse files Browse the repository at this point in the history
  • Loading branch information
callingmedic911 committed Jul 1, 2024
1 parent b227942 commit f9ff028
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/replayio/src/commands/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { launchBrowser } from "../utils/browser/launchBrowser";
import { reportBrowserCrash } from "../utils/browser/reportBrowserCrash";
import { registerCommand } from "../utils/commander/registerCommand";
import { confirm } from "../utils/confirm";
import { logger } from "@replay-cli/shared/logger";

registerCommand("record", { checkForRuntimeUpdate: true, requireAuthentication: true })
.argument("[url]", `URL to open (default: "about:blank")`)
Expand All @@ -38,6 +39,7 @@ async function record(url: string = "about:blank") {
await launchBrowser(url, { processGroupId });
} catch (error) {
if (error instanceof ProcessError) {
logger.error("Record:BrowserCrash", { error: error.stderr });
const { errorLogPath, uploaded } = await reportBrowserCrash(error.stderr);

console.log("\nSomething went wrong while recording. Try again.");
Expand Down

0 comments on commit f9ff028

Please sign in to comment.