Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Fixes elastic#14171 - Handle boom errors properly for vis data reques…
Browse files Browse the repository at this point in the history
  • Loading branch information
simianhacker authored Sep 26, 2017
1 parent 893b399 commit 9ec5d90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core_plugins/metrics/server/routes/vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export default (server) => {
getVisData(req)
.then(reply)
.catch(err => {
reply(Boom.wrap(err, 400));
if (err.isBoom && err.status === 401) return reply(err);
reply(Boom.wrap(err, 500));
});
}
});
Expand Down

0 comments on commit 9ec5d90

Please sign in to comment.