Skip to content

Commit

Permalink
validate-email authorize confirmation error is included as cause with…
Browse files Browse the repository at this point in the history
… thrown Error
  • Loading branch information
gobengo committed Mar 14, 2023
1 parent 901c460 commit 9080cfb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/access-api/src/routes/validate-email.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ async function authorize(req, env) {
})

if (confirmation.error) {
throw new Error(`unable to validate access session: ${confirmation}`)
throw new Error(`unable to validate access session: ${confirmation}`, {
cause: confirmation.error,
})
}

const confirm = provide(
Expand Down

0 comments on commit 9080cfb

Please sign in to comment.