@azteam/express 1.2.486 → 1.2.487
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 +3 -0
- package/package.json +1 -1
- package/src/Server.js +5 -0
package/lib/Server.js
CHANGED
|
@@ -353,6 +353,9 @@ var Server = /*#__PURE__*/function () {
|
|
|
353
353
|
if (error.errors[0].code === _error.UNKNOWN) {
|
|
354
354
|
error.errors[0].message = '';
|
|
355
355
|
}
|
|
356
|
+
if (error.errors[0].code === _error.NOT_FOUND) {
|
|
357
|
+
error.errors[0].url = req.originalUrl;
|
|
358
|
+
}
|
|
356
359
|
return res.status(error.status).json({
|
|
357
360
|
success: false,
|
|
358
361
|
errors: error.errors
|
package/package.json
CHANGED
package/src/Server.js
CHANGED
|
@@ -327,6 +327,11 @@ class Server {
|
|
|
327
327
|
if (error.errors[0].code === UNKNOWN) {
|
|
328
328
|
error.errors[0].message = '';
|
|
329
329
|
}
|
|
330
|
+
|
|
331
|
+
if (error.errors[0].code === NOT_FOUND) {
|
|
332
|
+
error.errors[0].url = req.originalUrl;
|
|
333
|
+
}
|
|
334
|
+
|
|
330
335
|
return res.status(error.status).json({success: false, errors: error.errors});
|
|
331
336
|
});
|
|
332
337
|
|