diff --git a/src/command.ts b/src/command.ts index 56bf5099966..01721f21334 100644 --- a/src/command.ts +++ b/src/command.ts @@ -516,7 +516,7 @@ export function validateProjectId(project: string): void { if (PROJECT_ID_REGEX.test(project)) { return; } - trackGA4("error", { + void trackGA4("error", { error_type: "Error (User)", details: "Invalid project ID", }); diff --git a/src/commands/hosting-channel-open.ts b/src/commands/hosting-channel-open.ts index 6ae379ab43f..1a7699f7e1b 100644 --- a/src/commands/hosting-channel-open.ts +++ b/src/commands/hosting-channel-open.ts @@ -3,7 +3,8 @@ import { bold } from "colorette"; import * as open from "open"; import { Command } from "../command"; -import { FirebaseError } from "../error"; +import { FirebaseError, getErrMsg } from "../error"; +import { logger } from "../logger"; import { getChannel, listChannels, normalizeName } from "../hosting/api"; import { requirePermissions } from "../requirePermissions"; import { needProjectId } from "../projectUtils"; @@ -55,7 +56,9 @@ export const command = new Command("hosting:channel:open [channelId]") logLabeledBullet("hosting:channel", channel.url); if (!options.nonInteractive) { - open(channel.url); + open(channel.url).catch((err: unknown) => { + logger.debug(`Unable to open URL: ${getErrMsg(err)}`); + }); } return { url: channel.url }; diff --git a/src/commands/open.ts b/src/commands/open.ts index ceaa0d34a25..0a8ed194a25 100644 --- a/src/commands/open.ts +++ b/src/commands/open.ts @@ -1,7 +1,7 @@ import * as clc from "colorette"; import * as open from "open"; -import { FirebaseError } from "../error"; +import { FirebaseError, getErrMsg } from "../error"; import * as api from "../api"; import { Command } from "../command"; import { logger } from "../logger"; @@ -114,5 +114,7 @@ export const command = new Command("open [link]") logger.info(`Opening ${clc.bold(link.name)} link in your default browser:`); logger.info(clc.bold(clc.underline(url))); - open(url); + open(url).catch((err: unknown) => { + logger.debug(`Unable to open URL: ${getErrMsg(err)}`); + }); }); diff --git a/src/gcp/cloudbilling.ts b/src/gcp/cloudbilling.ts index 156a1a04752..f3658f3031a 100644 --- a/src/gcp/cloudbilling.ts +++ b/src/gcp/cloudbilling.ts @@ -148,7 +148,7 @@ async function openBillingAccount( ): Promise { if (open) { try { - opn(url); + await opn(url); } catch (err: any) { logger.debug("Unable to open billing URL: " + err.stack); } diff --git a/src/throttler/throttler.ts b/src/throttler/throttler.ts index 9943240b20a..3a21a5a2a40 100644 --- a/src/throttler/throttler.ts +++ b/src/throttler/throttler.ts @@ -144,7 +144,8 @@ export abstract class Throttler { } this.active++; - this.handle(this.nextWaitingTaskIndex()); + // handle() records task success and failure itself and is intentionally not awaited (process() is sync and drives concurrency). + void this.handle(this.nextWaitingTaskIndex()); } async handle(cursorIndex: number): Promise {