From 23191f813ee8be659955285f6745674a025e1343 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 22:55:35 +0000 Subject: [PATCH] Address instrumentation review feedback --- apps/dashboard/src/instrumentation-node.ts | 4 ++-- apps/dashboard/src/instrumentation.ts | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/dashboard/src/instrumentation-node.ts b/apps/dashboard/src/instrumentation-node.ts index 54e502d72..cdd8b6cda 100644 --- a/apps/dashboard/src/instrumentation-node.ts +++ b/apps/dashboard/src/instrumentation-node.ts @@ -1,9 +1,9 @@ import "server-only"; -import { getEnvVariable } from "@hexclave/shared/dist/utils/env"; +import { getEnvBoolean } from "@hexclave/shared/dist/utils/env"; export async function startRemoteDevelopmentEnvironmentLifecycleIfNeeded(): Promise { - if (getEnvVariable("NEXT_PUBLIC_STACK_IS_REMOTE_DEVELOPMENT_ENVIRONMENT", "") !== "true") { + if (!getEnvBoolean("NEXT_PUBLIC_STACK_IS_REMOTE_DEVELOPMENT_ENVIRONMENT")) { return; } diff --git a/apps/dashboard/src/instrumentation.ts b/apps/dashboard/src/instrumentation.ts index 599b21498..beaed1a12 100644 --- a/apps/dashboard/src/instrumentation.ts +++ b/apps/dashboard/src/instrumentation.ts @@ -31,8 +31,10 @@ export async function register(): Promise { let nicified; try { nicified = nicify(error, { maxDepth: 8 }); - } catch (e) { - nicified = `Error occurred during nicification: ${e}`; + } catch (nicifyError: unknown) { + // Only nicify errors are converted to metadata; the original event still reports. + const nicifyErrorMessage = nicifyError instanceof Error ? nicifyError.message : String(nicifyError); + nicified = `Error occurred during nicification: ${nicifyErrorMessage}`; } if (error instanceof Error) { event.extra = {