mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Exclude stacktrace from error response of Timelion backend (#12973)
This commit is contained in:
parent
555bb70d64
commit
1e4d4c7753
1 changed files with 5 additions and 1 deletions
|
@ -4,7 +4,10 @@ import chainRunnerFn from '../handlers/chain_runner.js';
|
|||
const timelionDefaults = require('../lib/get_namespaced_settings')();
|
||||
|
||||
function replyWithError(e, reply) {
|
||||
reply({ title: e.toString(), message: e.toString(), stack: e.stack }).code(400);
|
||||
reply({
|
||||
title: e.toString(),
|
||||
message: e.toString()
|
||||
}).code(500);
|
||||
}
|
||||
|
||||
|
||||
|
@ -39,6 +42,7 @@ export default function (server) {
|
|||
});
|
||||
|
||||
} catch (err) {
|
||||
server.log(['timelion', 'error'], `${err.toString()}: ${err.stack}`);
|
||||
// TODO Maybe we should just replace everywhere we throw with Boom? Probably.
|
||||
if (err.isBoom) {
|
||||
reply(err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue