[db-ip] Handle Geocoder::OverQueryLimitError gracefully (#1230)
* Handle Geocoder::OverQueryLimitError gracefully. Geocoder::OverQueryLimitError errors were not being generated correctly, and the response was coming back empty but with no indication. This changes the behavior slightly so that unknown errors are also returned. * Add error handling tests * Remove unnecessary config in tests
Showing
- lib/geocoder/lookups/db_ip_com.rb 13 additions, 9 deletionslib/geocoder/lookups/db_ip_com.rb
- test/fixtures/db_ip_com_madison_square_garden 0 additions, 0 deletionstest/fixtures/db_ip_com_madison_square_garden
- test/fixtures/db_ip_com_quota_exceeded 1 addition, 0 deletionstest/fixtures/db_ip_com_quota_exceeded
- test/fixtures/db_ip_com_unknown_error 1 addition, 0 deletionstest/fixtures/db_ip_com_unknown_error
- test/test_helper.rb 2 additions, 2 deletionstest/test_helper.rb
- test/unit/lookups/db_ip_com_test.rb 16 additions, 4 deletionstest/unit/lookups/db_ip_com_test.rb
Loading
Please register or sign in to comment