egg 3.17.4 → 3.17.5

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.
@@ -236,8 +236,15 @@ module.exports = appInfo => {
236
236
  depth: 5,
237
237
  parameterLimit: 1000,
238
238
  },
239
- onerror(err) {
239
+ onerror(err, ctx) {
240
240
  err.message += ', check bodyParser config';
241
+ if (ctx.status === 404) {
242
+ // set default status to 400, meaning client bad request
243
+ ctx.status = 400;
244
+ if (!err.status) {
245
+ err.status = 400;
246
+ }
247
+ }
241
248
  throw err;
242
249
  },
243
250
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egg",
3
- "version": "3.17.4",
3
+ "version": "3.17.5",
4
4
  "publishConfig": {
5
5
  "tag": "latest"
6
6
  },