LG-8563: Restrict ArcGIS API address results to certain types#7753
Merged
allthesignals merged 13 commits intomainfrom Feb 2, 2023
Merged
LG-8563: Restrict ArcGIS API address results to certain types#7753allthesignals merged 13 commits intomainfrom
allthesignals merged 13 commits intomainfrom
Conversation
# Conflicts: # app/controllers/idv/in_person/address_search_controller.rb
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
…F/identity-idp into wmg/experiment-single-request
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
# Conflicts: # spec/services/arcgis_api/geocoder_spec.rb
3 tasks
Contributor
Author
|
Commit history looks crazy sorry! |
NavaTim
approved these changes
Feb 1, 2023
allthesignals
commented
Feb 1, 2023
| if supported_params.empty? | ||
| raise ArgumentError, <<~MSG | ||
| Unknown parameters: #{options.except(KNOWN_FIND_ADDRESS_CANDIDATES_PARAMETERS)}. | ||
| Unknown parameters: #{options.except(*KNOWN_FIND_ADDRESS_CANDIDATES_PARAMETERS)}. |
Contributor
Author
There was a problem hiding this comment.
@tomas-nava noticed this earlier so I'm fixing here: #7746 (comment)
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎫 Ticket
🛠 Summary of changes
Before:
Geocoder class was asking ArcGIS API for addresses of any kind of address. This caused errors when ArcGIS would find a valid cross street, for example, but USPS's API does not understand cross streets.
After:
Geocoder class asks ArcGIS API only for a select few types of addresses using the category parameter. Those categories are described in the
Addr_typefield.Specifically, we restrict the categories only to ones we believe USPS API will understand, which are:
USPS API does not seem to understand these types of addresses:
📜 Testing Plan