tweag / servant-oauth2

A modern servant wrapper around the wai-middleware-auth OAuth2 provider implementations.
MIT License
9 stars 4 forks source link

Make it so that the error details get bubble up; presently if you hit an error they are lost #4

Open silky opened 2 years ago

silky commented 2 years ago

We don't include the error details, see: https://github.com/tweag/servant-oauth2/blob/main/src/Servant/OAuth2.hs#L124

I think this could come about as part of re-working the wai-middleware-auth to be more servant-compatible.

silky commented 2 years ago

in particular the thing variable contains some text about the error that we could throw so someone can observe it or log it

silky commented 2 years ago

the easiest way to proceed here would be to just add our own custom ServantOAuth2Error type, and throw those, with the information we want to provide.