milkio 0.4.1 → 0.4.2

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.
@@ -148,6 +148,13 @@ export function defineHttpHandler(app: MilkioApp, options: ExecuteHttpServerOpti
148
148
 
149
149
  const resultsRaw = await app._call(mode, pathstr, params, headers, { executeId, logger, detail });
150
150
 
151
+ if (resultsRaw.$result.success === false) {
152
+ if (resultsRaw.$result.fail.code === "TYPE_SAFE_ERROR") {
153
+ if (((resultsRaw.$result.fail.data as any).value) === undefined) (resultsRaw.$result.fail.data as any).value === "undefined";
154
+ if (((resultsRaw.$result.fail.data as any).value) === null) (resultsRaw.$result.fail.data as any).value === "null";
155
+ }
156
+ }
157
+
151
158
  let fn: any;
152
159
  try {
153
160
  fn = await schema.apiValidator.validate[pathstr]();
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "milkio",
3
3
  "type": "module",
4
4
  "module": "index.ts",
5
- "version": "0.4.1",
5
+ "version": "0.4.2",
6
6
  "peerDependencies": {
7
7
  "typescript": "^5.4.2"
8
8
  },