Skip to content

Handle unexpected ArcGIS response body#8970

Merged
tomas-nava merged 6 commits intomainfrom
tomas/handle-malformed-arcgis-response-body
Aug 9, 2023
Merged

Handle unexpected ArcGIS response body#8970
tomas-nava merged 6 commits intomainfrom
tomas/handle-malformed-arcgis-response-body

Conversation

@tomas-nava
Copy link
Contributor

@tomas-nava tomas-nava commented Aug 9, 2023

🛠 Summary of changes

Handles an unexpected response body from the ArcGIS service.

Also:

  • raises a 422 instead of a 400 for most errors in Idv::InPerson::AddressSearchController, to stay consistent with Idv::InPerson::UspsLocationsControllerac41738
  • adds a missing test – 45e1df6

📔 Notes

Tomas Apodaca added 5 commits August 9, 2023 13:10
keeps us consistent with the location controller
changelog: Internal, In-person proofing, Handle a malformed response body from ArcGIS service
@tomas-nava tomas-nava requested review from a team and allthesignals August 9, 2023 20:16
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

else
:internal_server_error
end
when Faraday::Error,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

personally, I like the less-indented version of this the case/when statements, I'm guessing our rubocop allows both

Copy link
Contributor Author

@tomas-nava tomas-nava Aug 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You wrote the statements I'm changing here :) Yes, rubocop allows both, and I find the left-justfied version confusing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if rubocop allows both, author's choice I think (until we can figure out how to get it to enforce one or the other)

@tomas-nava tomas-nava merged commit d2ea033 into main Aug 9, 2023
@tomas-nava tomas-nava deleted the tomas/handle-malformed-arcgis-response-body branch August 9, 2023 21:36
@jmdembe jmdembe mentioned this pull request Aug 15, 2023
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