@jayfong/x-server 2.78.1 → 2.78.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.
@@ -118,7 +118,7 @@ class Handler {
118
118
  url: err.options.url.toString(),
119
119
  headers: JSON.stringify(err.options.headers || {}),
120
120
  query: (err.options.search ?? err.options.searchParams?.toString()) || '',
121
- body: err.options.body?.toString() ?? (err.options.form ? JSON.stringify(err.options.form) : '')
121
+ body: (err.options.json ? JSON.stringify(err.options.json) : err.options.form ? new URLSearchParams(err.options.form).toString() : err.options.body?.toString()) || ''
122
122
  });
123
123
  }
124
124
  // 服务器错误
@@ -112,7 +112,7 @@ export class Handler {
112
112
  url: err.options.url.toString(),
113
113
  headers: JSON.stringify(err.options.headers || {}),
114
114
  query: (err.options.search ?? err.options.searchParams?.toString()) || '',
115
- body: err.options.body?.toString() ?? (err.options.form ? JSON.stringify(err.options.form) : '')
115
+ body: (err.options.json ? JSON.stringify(err.options.json) : err.options.form ? new URLSearchParams(err.options.form).toString() : err.options.body?.toString()) || ''
116
116
  });
117
117
  }
118
118
  // 服务器错误
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayfong/x-server",
3
- "version": "2.78.1",
3
+ "version": "2.78.2",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",