@seam-rpc/server 4.3.10 → 4.3.13

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -64,6 +64,7 @@ export class SeamRouter {
64
64
  input = await this.runMiddleware(req, res);
65
65
  }
66
66
  catch (err) {
67
+ console.error(err);
67
68
  return res.status(415).send(String(err));
68
69
  }
69
70
  // Validate input
@@ -121,7 +122,7 @@ export class SeamRouter {
121
122
  }
122
123
  // Validate output
123
124
  try {
124
- validatedOutput = this.validateOutput(output, z.object({ ok: true, data: procedure.output }).or(z.object({ ok: false, error: z.any() })));
125
+ validatedOutput = this.validateOutput(output, z.object({ ok: z.literal(true), data: procedure.output }).or(z.object({ ok: z.literal(false), error: z.any() })));
125
126
  }
126
127
  catch (err) {
127
128
  seamSpace.emit("outputValidationError", err, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seam-rpc/server",
3
- "version": "4.3.10",
3
+ "version": "4.3.13",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "bin": {