projects
/
osm
/
UI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Close button on view user in user management dashboard
[osm/UI.git]
/
skyquake
/
framework
/
core
/
api_utils
/
utils.js
diff --git
a/skyquake/framework/core/api_utils/utils.js
b/skyquake/framework/core/api_utils/utils.js
index
3a50964
..
667e7a9
100644
(file)
--- a/
skyquake/framework/core/api_utils/utils.js
+++ b/
skyquake/framework/core/api_utils/utils.js
@@
-196,6
+196,9
@@
if (process.env.LOG_REQUESTS) {
* @param {Function} res - a handle to the express response function
*/
var sendErrorResponse = function(error, res) {
* @param {Function} res - a handle to the express response function
*/
var sendErrorResponse = function(error, res) {
+ if (!error.statusCode) {
+ console.error('Status Code has not been set in error object: ', error);
+ }
res.status(error.statusCode);
res.send(error);
}
res.status(error.statusCode);
res.send(error);
}