Skip to content

Commit

Permalink
fx: ZENKO-1112 Management client error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas2bert committed Sep 7, 2018
1 parent 7088812 commit 93ac1e1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module.exports = {
constants: require('./lib/constants'),
db: require('./lib/db'),
errors: require('./lib/errors.js'),
errorUtils: require('./lib/errorUtils'),
shuffle: require('./lib/shuffle'),
stringHash: require('./lib/stringHash'),
ipCheck: require('./lib/ipCheck'),
Expand Down
12 changes: 12 additions & 0 deletions lib/errorUtils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function reshapeExceptionError(error) {
return {
message: error.message,
code: error.code,
stack: error.stack,
name: error.name,
};
}

module.exports = {
reshapeExceptionError,
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"engines": {
"node": ">=8"
},
"version": "8.0.2",
"version": "8.0.3",
"description": "Common utilities for the S3 project components",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 93ac1e1

Please sign in to comment.