@azteam/express 1.2.467 → 1.2.469

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/Server.js CHANGED
@@ -342,12 +342,13 @@ var Server = /*#__PURE__*/function () {
342
342
  var error = (0, _error.errorCatch)(err);
343
343
  if (process.env.NODE_ENV === 'development') {
344
344
  console.log(error.errors);
345
- } else if (error.errors[0].code === _error.UNKNOWN) {
346
- console.error(req.originalUrl, err);
347
345
  }
348
346
  if (_this4.callbackError) {
349
347
  _this4.callbackError(error, req.originalUrl);
350
348
  }
349
+ if (error.errors[0].code === _error.UNKNOWN) {
350
+ error.errors[0].message = '';
351
+ }
351
352
  return res.status(error.status).json({
352
353
  success: false,
353
354
  errors: error.errors
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azteam/express",
3
- "version": "1.2.467",
3
+ "version": "1.2.469",
4
4
  "license": "MIT",
5
5
  "author": "toda <sp.azsolution.net@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -12,7 +12,7 @@
12
12
  "@azteam/constant": "1.0.13",
13
13
  "@azteam/crypto": "1.0.42",
14
14
  "@azteam/error": "1.0.40",
15
- "@azteam/http-client": "1.0.203",
15
+ "@azteam/http-client": "1.0.204",
16
16
  "@azteam/util": "1.0.52",
17
17
  "@azteam/validator": "1.0.30",
18
18
  "@grpc/grpc-js": "1.6.7",
package/src/Server.js CHANGED
@@ -313,17 +313,15 @@ class Server {
313
313
 
314
314
  app.use((err, req, res, next) => {
315
315
  const error = errorCatch(err);
316
-
317
316
  if (process.env.NODE_ENV === 'development') {
318
317
  console.log(error.errors);
319
- } else if (error.errors[0].code === UNKNOWN) {
320
- console.error(req.originalUrl, err);
321
318
  }
322
-
323
319
  if (this.callbackError) {
324
320
  this.callbackError(error, req.originalUrl);
325
321
  }
326
-
322
+ if (error.errors[0].code === UNKNOWN) {
323
+ error.errors[0].message = '';
324
+ }
327
325
  return res.status(error.status).json({success: false, errors: error.errors});
328
326
  });
329
327