purescript-react-realworld icon indicating copy to clipboard operation
purescript-react-realworld copied to clipboard

Add console logging for token errors

Open maridonkers opened this issue 2 years ago • 0 comments

Currently errors in Conduit.Data.Jwt are silently ignored because toAuth uses hush and errors in Lefts are dropped to Nothing.

When for example Webgear Realworld is used for a server, the following token error is reported:

JSONDecodeError: (Named "Jwt" (AtKey "username" MissingValue))

(Because apparently the Webgear Realworld implementation at the server does not encode username and exp in the login response. Things like these are hard to find without console logging of token errors.)

In maridonkers/purescript-react-realworld branch tokenlogging there's console logging added. Will do a pull request for this.

maridonkers avatar Oct 28 '22 12:10 maridonkers