shelving 1.150.2 → 1.150.3
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/feedback/Feedbacks.js +1 -1
- package/package.json +1 -1
- package/util/http.js +3 -3
package/feedback/Feedbacks.js
CHANGED
package/package.json
CHANGED
package/util/http.js
CHANGED
|
@@ -118,9 +118,9 @@ export function getErrorResponse(reason, debug = false) {
|
|
|
118
118
|
const status = reason instanceof RequestError ? reason.code : 500;
|
|
119
119
|
// Throw `Error` to return `{ message: "etc" }` to the client (but only if `debug` is true so we don't leak error details to the client).
|
|
120
120
|
if (debug && isError(reason)) {
|
|
121
|
-
// Manually destructure because `
|
|
122
|
-
const { message, ...rest } = reason;
|
|
123
|
-
return Response.json({ message, ...rest }, { status });
|
|
121
|
+
// Manually destructure because `message` and `cause` on `Error` are not enumerable.
|
|
122
|
+
const { message, cause, ...rest } = reason;
|
|
123
|
+
return Response.json({ message, cause, ...rest }, { status });
|
|
124
124
|
}
|
|
125
125
|
// Otherwise return a generic error message with no details.
|
|
126
126
|
return new Response(undefined, { status });
|