feat: improve error details of PGRST301 error

This commit is contained in:
Taimoor Zaeem
2025-05-31 13:30:32 -05:00
committed by Steve Chavez
parent f6316b86e4
commit c5ccf742d6
4 changed files with 18 additions and 6 deletions
+2 -2
View File
@@ -76,8 +76,8 @@ parseToken AppConfig{..} (Just tkn) time = do
-- BadAlgorithm
-- KeyError
-- BadCrypto
jwtDecodeError (JWT.KeyError _) = JwtDecodeErr KeyError
jwtDecodeError (JWT.BadAlgorithm _) = JwtDecodeErr BadAlgorithm
jwtDecodeError (JWT.KeyError m) = JwtDecodeErr $ KeyError m
jwtDecodeError (JWT.BadAlgorithm m) = JwtDecodeErr $ BadAlgorithm m
jwtDecodeError JWT.BadCrypto = JwtDecodeErr BadCrypto
-- Control never reaches here, the decode function only returns the above three
jwtDecodeError _ = JwtDecodeErr UnreachableDecodeError