Skip to content

Instantly share code, notes, and snippets.

@gpares

gpares/errors.rb Secret

Created January 12, 2022 20:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gpares/abb3f1a8dc2e394bb119edfae1775363 to your computer and use it in GitHub Desktop.
Save gpares/abb3f1a8dc2e394bb119edfae1775363 to your computer and use it in GitHub Desktop.
An HTTP request has been made that VCR does not know how to handle:
GET https://api.mailgun.net/v3/address/private/validate?address=eng@foobar.com
There is currently no cassette in use. There are a few ways
you can configure VCR to handle this request:
* If you're surprised VCR is raising this error
and want insight about how VCR attempted to handle the request,
you can use the debug_logger configuration option to log more details [1].
* If you want VCR to record this request and play it back during future test
runs, you should wrap your test (or this portion of your test) in a
`VCR.use_cassette` block [2].
* If you only want VCR to handle requests made while a cassette is in use,
configure `allow_http_connections_when_no_cassette = true`. VCR will
ignore this request since it is made when there is no cassette [3].
* If you want VCR to ignore this request (and others like it), you can
set an `ignore_request` callback [4].
[1] https://www.relishapp.com/vcr/vcr/v/6-0-0/docs/configuration/debug-logging
[2] https://www.relishapp.com/vcr/vcr/v/6-0-0/docs/getting-started
[3] https://www.relishapp.com/vcr/vcr/v/6-0-0/docs/configuration/allow-http-connections-when-no-cassette
[4] https://www.relishapp.com/vcr/vcr/v/6-0-0/docs/configuration/ignore-request
================================================================================
(VCR::Errors::UnhandledHTTPRequestError)
./app/services/mailgun/email_validation.rb:40:in `response'
./app/services/mailgun/email_validation.rb:24:in `validate'
./app/services/mailgun/email_validation.rb:11:in `call'
./app/validators/mailgun_api_email_validator.rb:7:in `validate'
./app/models/concerns/steppable.rb:173:in `save'
./app/models/customer.rb:483:in `quote_wizard_save!'
./app/controllers/dealer/quotes_controller.rb:50:in `update_customer_address'
And I click next and twilio mailgun are approved
And 'I click next and twilio mailgun are approved' do
WebMock.allow_net_connect!
VCR.use_cassette("automatic_payment_added") do
page.find('#customer-information-next-btn').click
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment