mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into devel
This commit is contained in:
commit
73f344160d
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue