milkio 0.0.21 → 0.0.22

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.
@@ -82,7 +82,7 @@ export function defineHttpHandler(app: MilkioApp, options: ExecuteHttpServerOpti
82
82
  loggerPushTags(executeId, {
83
83
  body: rawbody || "no body"
84
84
  })
85
- response.body = `{"executeId":"${executeId}","success":false,"fail":{"code":"NOT_FOUND","message":${JSON.stringify(failCode.NOT_FOUND())}}}`
85
+ if (!response.body) response.body = `{"executeId":"${executeId}","success":false,"fail":{"code":"NOT_FOUND","message":${JSON.stringify(failCode.NOT_FOUND())}}}`
86
86
 
87
87
  loggerPushTags(executeId, {
88
88
  status: response.status,
@@ -159,7 +159,7 @@ export function defineHttpHandler(app: MilkioApp, options: ExecuteHttpServerOpti
159
159
  response.body = middlewareResponse.value
160
160
  } catch (error) {
161
161
  const result = hanldeCatchError(error, executeId)
162
- response.body = TSON.stringify(result)
162
+ if (!response.body) response.body = TSON.stringify(result)
163
163
  }
164
164
 
165
165
  loggerPushTags(executeId, {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "milkio",
3
3
  "type": "module",
4
4
  "module": "index.ts",
5
- "version": "0.0.21",
5
+ "version": "0.0.22",
6
6
  "peerDependencies": {
7
7
  "typescript": "^5.4.2"
8
8
  },