Skip to content

Commit

Permalink
fix error to return stack
Browse files Browse the repository at this point in the history
  • Loading branch information
jchartrand committed Oct 23, 2023
1 parent 02978be commit 7804aa6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ export async function build(opts = {}) {
return res.json(signedVC)
} catch (e) {
// we have to catch the async errors and pass them to the error handler
// note here that if e contains a code property, the spread of e will
// (deliberately) overwrite the 403
next({code: 403, ...e})
const code = e.code || 500
next({code, error: e.stack})
}
})

Expand Down

0 comments on commit 7804aa6

Please sign in to comment.