mirror of
https://github.com/freckle/yesod-auth-oauth2.git
synced 2026-01-19 23:51:55 +01:00
This was lazy and resulted in a confusing error experience where a JSONDecodingError fetching credentials appeared as an Unknown OAuth2 ErrorResponse, making it appear like the OAuth2 provider was indicating this error to us, instead of it being a simple incorrect parser in our own code. ErrorResponse is specifically meant to parse error parameters sent to us by the OAuth2 provider. They may be user-actionable and can be safely displayed. This is a very narrow use-case. The Unknown constructor is required for us to be exhaustive on our string error names, but it should not be hijacked to store our own errors. This commit separates and documents the two error scenarios. |
||
|---|---|---|
| .. | ||
| Auth | ||