Skip to content

Commit

Permalink
fix: don't override internal flag
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Dec 12, 2020
1 parent 3002b27 commit a5ee318
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ export function createApp (options: AppOptions = {}): App {
return options.onError(error, req, res)
}
// @ts-ignore
error.internal = true
if (typeof error.internal === 'undefined') {
// @ts-ignore
error.internal = true
}
return sendError(res, error, !!options.debug)
})
}
Expand Down

0 comments on commit a5ee318

Please sign in to comment.