1
0
Fork 0

Merge branch 'devel' of https://github.com/arangodb/arangodb into devel

This commit is contained in:
Simon Grätzer 2017-01-14 13:38:00 +01:00
commit 73f344160d
1 changed files with 6 additions and 1 deletions

View File

@ -325,8 +325,13 @@ module.exports =
if (service.isDevelopment) {
const err = error.cause || error;
body.exception = String(err);
if (err.stack === undefined) {
body.stacktrace = "no stacktrace available";
} else {
body.stacktrace = err.stack.replace(/\n+$/, '').split('\n');
}
}
if (error.extra) {
Object.keys(error.extra).forEach(function (key) {
body[key] = error.extra[key];