two-stroke 1.0.5 → 1.0.6
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 +1 -1
- package/src/index.ts +10 -2
- package/src/release.ts +1 -1
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -89,7 +89,11 @@ export function twoStroke<T extends Env>(title: string, release: string) {
|
|
|
89
89
|
sentry,
|
|
90
90
|
});
|
|
91
91
|
else {
|
|
92
|
-
console.error(
|
|
92
|
+
console.error({
|
|
93
|
+
message: "Request body schema invalid",
|
|
94
|
+
error: body.error,
|
|
95
|
+
body: rawBody,
|
|
96
|
+
});
|
|
93
97
|
return new Response(JSON.stringify(body.error), {
|
|
94
98
|
status: 400,
|
|
95
99
|
});
|
|
@@ -107,7 +111,11 @@ export function twoStroke<T extends Env>(title: string, release: string) {
|
|
|
107
111
|
}
|
|
108
112
|
const output = route.output.safeParse(response.body);
|
|
109
113
|
if (!output.success) {
|
|
110
|
-
console.error(
|
|
114
|
+
console.error({
|
|
115
|
+
message: "Response body schema invalid",
|
|
116
|
+
error: output.error,
|
|
117
|
+
body: response.body,
|
|
118
|
+
});
|
|
111
119
|
}
|
|
112
120
|
response.headers = response.headers ?? {};
|
|
113
121
|
response.headers["Content-Type"] =
|
package/src/release.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default "undefined";
|
|
1
|
+
export default "undefined";
|