express-sweet-generator 2.0.15 → 2.0.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-sweet-generator",
3
- "version": "2.0.15",
3
+ "version": "2.0.17",
4
4
  "description": "EXPRESS SWEET application generator.",
5
5
  "main": "bin/express-sweet-cli.js",
6
6
  "files": [
@@ -11,6 +11,9 @@ module.exports = (req, res, next) => {
11
11
  // Log validation errors only if LOG_VALIDATION_ERRORS is enabled
12
12
  if (process.env.LOG_VALIDATION_ERRORS === 'true')
13
13
  console.error('Validation errors:', result.array());
14
- res.status(400).end();
14
+
15
+ // Return validation errors as JSON.
16
+ res.status(400).json({errors: result.array()});
17
+ // res.status(400).end();
15
18
  }
16
19
  }