@srpc.org/core 0.20.5 → 0.20.7
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/dist/server.js +6 -1
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -150,8 +150,13 @@ const srpcFetchApi = ({ router, endpoint, createContext, transformer: serializer
|
|
|
150
150
|
});
|
|
151
151
|
} catch (error) {
|
|
152
152
|
if (error instanceof SRPCError) {
|
|
153
|
-
return new Response(serializer.serialize(
|
|
153
|
+
return new Response(serializer.serialize({
|
|
154
|
+
...error,
|
|
155
|
+
stack: null,
|
|
156
|
+
message: error.message
|
|
157
|
+
}), {
|
|
154
158
|
status: StatusCodeMap[error.code],
|
|
159
|
+
statusText: error.message,
|
|
155
160
|
headers: {
|
|
156
161
|
"Content-Type": "application/json"
|
|
157
162
|
}
|