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

Map address validation exceptions to VertexClient::ValidationError #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

astupka
Copy link
Member

@astupka astupka commented May 4, 2020

Description

This PR attempts to convert common address validation errors masquerading as Savon::SOAPFaults into VertexClient::ValidationErrors. This should allow the client to handle these exceptions and continue processing.

As an example, the Groups app would be able to use some default value for address validation errors, but because SOAPFaults could be a more serious networking issue processing ends and the user receives a 500 page.

Changes

The error codes present in the address validation exceptions are found here. By parsing out the error code a VertexClient::ValidationError can be raised instead of a SOAPFault for the subset of the error codes pertaining to address validation. The VertexClient::ValidationError exception is already in use for other validation in this client.

JIRA Ticket

XX-1234

Screenshots

Notes

  * This is needed to handle validation differently in the client.
@astupka astupka requested review from drinks and akulisek May 4, 2020 06:04
@coding-bunny
Copy link

Missing a bump in version.rb

@astupka
Copy link
Member Author

astupka commented May 4, 2020

Hmm, looks like I also need to remove safe navigation due to 2.1 support.

@coding-bunny
Copy link

you could technically wait till I push out the v1.0.0 which increases the minimum ruby version needed. But I assume you need this for a low-ruby project?

@astupka
Copy link
Member Author

astupka commented May 5, 2020

Awesome. I can wait for 1.0.0. This update is for groups which Dan has updated to 2.5.3

Copy link

This PR is open and inactive for 30 days. Merging PRs open after a long time is error-prone. Please proceed to merging or make a comment to keep it open. You can also prevent PRs from being tagged stale or closed with 'keep-open' tag. If there is no activity in 90 days, this PR will be closed

@github-actions github-actions bot added the stale label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants