Skip to content

Commit

Permalink
feat: 🎸 improve error type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Apr 3, 2020
1 parent f46820d commit b022988
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/data/server/index_patterns/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export function registerRoutes(http: HttpServiceSetup) {
});
} catch (error) {
if (
!!error.isBoom &&
typeof error === 'object' &&
!!error?.isBoom &&
!!error?.output?.payload &&
typeof error?.output?.payload === 'object'
) {
Expand Down

0 comments on commit b022988

Please sign in to comment.