From 5b2f529f3d072d28f04e2b866d22e329685b3228 Mon Sep 17 00:00:00 2001 From: tiago <70700766+tiagozip@users.noreply.github.com> Date: Wed, 28 Jan 2026 18:28:51 +0000 Subject: [PATCH] standalone@2.1.4: fixes minor configuration issue --- standalone/package.json | 2 +- standalone/src/index.js | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/standalone/package.json b/standalone/package.json index 4645383..648e1fd 100644 --- a/standalone/package.json +++ b/standalone/package.json @@ -1,6 +1,6 @@ { "name": "cap-standalone", - "version": "2.1.3", + "version": "2.1.4", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "dev": "bun run --watch src/index.js", diff --git a/standalone/src/index.js b/standalone/src/index.js index 86ec173..8c3976a 100644 --- a/standalone/src/index.js +++ b/standalone/src/index.js @@ -70,20 +70,23 @@ new Elysia({ } const errorId = Bun.randomUUIDv7().split("-").pop(); - console.error(`[${error.code || "ERR"} ${errorId}]`, JSON.stringify({ - timestamp: new Date().toISOString(), - error, - env: { - bun: process.versions.bun, - platform: process.platform, - mem: process.memoryUsage() - } - })); + + if (process.env.DISABLE_ERROR_LOGGING !== "true") { + console.error(`[${error.code || "ERR"} ${errorId}]`, JSON.stringify({ + timestamp: new Date().toISOString(), + error, + env: { + bun: process.versions.bun, + platform: process.platform, + mem: process.memoryUsage() + } + })); + } return { success: false, error: error.code || "Internal server error", - detail: { + detail: process.env.SHOW_ERRORS === "true" ? error : { troubleshooting: "http://capjs.js.org/guide/standalone/options.html#error-messages", id: errorId }