jose-jwt
jose-jwt copied to clipboard
Add ParseError for invalid JWT structures
Since the JWT is now parsed in advance, before decoding, none of the existing error codes really make sense for this stage (or can't be applied, since attoparsec returns an Either String a) result.
@tekul I am guessing this issue thread is related to the following:
https://github.com/tekul/jose-jwt/blob/1d59c9fdeb6159431ea12289784d487da86914fd/Jose/Internal/Parser.hs#L56-L57
The BadCrypto error here is confusing and should be replaced with a parse error. WDYT?