1
0
Fork 0

Fix Foxx CRUD errors (3.3) (#5877)

This commit is contained in:
Alan Plum 2018-08-15 11:56:16 +02:00 committed by Jan
parent d56fdf3b84
commit e41cece7c9
4 changed files with 5 additions and 2 deletions

View File

@ -3,6 +3,8 @@ v3.3.14 (2018-08-15)
* upgraded arangodb starter version to 0.13.1
* Foxx HTTP API errors now log stacktraces
* fixed issue #5736: Foxx HTTP API responds with 500 error when request body
is too short

View File

@ -88,6 +88,7 @@ router.use((req, res, next) => {
} catch (e) {
if (e.isArangoError) {
const status = actions.arangoErrorToHttpCode(e.errorNum);
console.errorStack(e);
res.throw(status, e.errorMessage, {
errorNum: e.errorNum,
cause: e

View File

@ -550,7 +550,7 @@
msg += `\nFile: ${filename}`;
}
if (e.lineNumber !== undefined) {
msg += `\nLine: ${e.lineNumber-2}`;
msg += `\nLine: ${e.lineNumber}`;
}
if (e.columnNumber !== undefined) {
msg += `\nColumn: ${e.columnNumber}`;

View File

@ -454,7 +454,7 @@ global.DEFINE_MODULE('console', (function () {
logStrings.push(err.stack);
}
} else {
logStrings.push(`via ${err.stack}`);
logStrings.push(`\nvia ${err.stack}`);
}
err = err.cause;
}