@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.
- package/lib/_cjs/core/handler.js +1 -1
- package/lib/core/handler.js +1 -1
- package/package.json +1 -1
package/lib/_cjs/core/handler.js
CHANGED
|
@@ -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.
|
|
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
|
// 服务器错误
|
package/lib/core/handler.js
CHANGED
|
@@ -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.
|
|
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
|
// 服务器错误
|