logging: prevent full logging of errors for silent logs

This commit is contained in:
Alice Gaudon 2020-11-11 19:24:45 +01:00
parent 24d83c73ad
commit 1fce157104

View File

@ -52,7 +52,7 @@ export default class LogRequestsComponent extends ApplicationComponent {
if (silent) {
if (err instanceof HttpError) logStr += ` ${err.errorCode}`;
logStr += ` ${err.name}`;
return req.log.info(err, logStr).requestId;
return req.log.info(err.name, logStr).requestId;
} else {
return req.log.error(err, logStr, additionalStr, err).requestId;
}