@everystack/server 0.4.17 → 0.4.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everystack/server",
3
- "version": "0.4.17",
3
+ "version": "0.4.18",
4
4
  "description": "Server runtime primitives for Lambda — event adapters, routing, SSR, image processing",
5
5
  "license": "AGPL-3.0-only",
6
6
  "author": "Scalable Technology, Inc. <licensing@scalable.technology>",
@@ -163,8 +163,8 @@
163
163
  "sst": "4.13.1",
164
164
  "ts-jest": "29.4.9",
165
165
  "typescript": "5.9.3",
166
- "@everystack/cli": "0.4.47",
167
- "@everystack/auth": "0.4.1"
166
+ "@everystack/cli": "0.4.48",
167
+ "@everystack/auth": "0.4.2"
168
168
  },
169
169
  "scripts": {
170
170
  "test": "jest",
package/src/index.ts CHANGED
@@ -336,11 +336,13 @@ export function createLambdaHandler(
336
336
  'cache-control': 'no-store',
337
337
  'x-request-id': requestId,
338
338
  },
339
+ // The error itself is already logged above against this same id, which `logs:query
340
+ // --traceId` looks up directly. Returning it here too would only copy it into an
341
+ // untrusted channel. The id goes in the BODY as well as the header because most clients
342
+ // surface a body and drop headers, and a caller who cannot quote the id cannot be helped.
339
343
  body: JSON.stringify({
340
344
  error: 'Internal Server Error',
341
- ...(process.env.ENVIRONMENT === 'dev'
342
- ? { details: String(error) }
343
- : {}),
345
+ requestId,
344
346
  }),
345
347
  };
346
348
  }
package/src/plugin.ts CHANGED
@@ -315,11 +315,11 @@ export function createPluginLambdaHandler(
315
315
  'cache-control': 'no-store',
316
316
  'x-request-id': requestId,
317
317
  },
318
+ // See the note on the same catch in index.ts: the error is already logged against this
319
+ // id, and `logs:query --traceId` resolves it. The id rides the body as well as the header.
318
320
  body: JSON.stringify({
319
321
  error: 'Internal Server Error',
320
- ...(process.env.ENVIRONMENT === 'dev'
321
- ? { details: String(error) }
322
- : {}),
322
+ requestId,
323
323
  }),
324
324
  };
325
325
  }