While for security purposes it's good to not pass along the details of what's failed when redeeming a token, swallowing the error here without recourse does make debugging more difficult, particularly for upstream errors like UnsupportedParameters:
|
.map_err(|_| RedeemTokenError::InvalidToken)?; |
Perhaps the error types could use some the thiserror #[from] or #[source] mechanisms to keep the underlying error details available?