Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deserialize alternative format errors #345

Merged
merged 7 commits into from
Feb 28, 2025

Conversation

Justintime50
Copy link
Member

@Justintime50 Justintime50 commented Feb 25, 2025

Description

  • Fixes error parsing
    • Allows for alternative format of errors field (previously we deserialized the errors field into a list of Error objects; however, sometimes the errors are simply a list of strings. This change make the errors field a list of Object allowing for either the new FieldError object or a list of strings. Users will need to check for the type of error returned and handle appropriately)
    • Removed the unused Error model
    • Added an explicit AddressVerificationFieldError model
    • The BetaPaymentRefund now uses a list of FieldError instead of Error for the errors field

Testing

  • Add alternative error format test
  • Add address verification error test

Pull Request Type

Please select the option(s) that are relevant to this PR.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement (fixing a typo, updating readme, renaming a variable name, etc)

@Justintime50 Justintime50 marked this pull request as ready for review February 28, 2025 18:45
@Justintime50 Justintime50 requested a review from a team as a code owner February 28, 2025 18:45
@Justintime50 Justintime50 merged commit f3f9d17 into master Feb 28, 2025
21 checks passed
@Justintime50 Justintime50 deleted the error_alternative_format branch February 28, 2025 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants