Skip to content
This repository

Dates passed through body in a_request method aren't correctly compared #216

Closed
wants to merge 25 commits into from

3 participants

Tiago Ferreira Lima Bartosz Blimke Myron Marston
Tiago Ferreira Lima

When dates are passed as parameters in body of the method a_request and are compared in method matching_hashes? they are in different formats, even being generated in the same way. This happen because when the JSON.parse do the conversion of a date the format is modified and the comparison in method matching_hashes? doesn't consider it, comparing peer-to-peer.

PS: Sorry about my mistake, submitting this pull request in portuguese. :P

myronmarston and others added some commits
Myron Marston myronmarston Add failing spec demonstrating em-http-request bug.
When a response modifying middleware is used with em-http-request, and a real request is made, the middleware can modify the response before the after_request is invoked. This prevents VCR from being able to record the response accurately.  The after_request hook should be invoked before the em-http-request middleware.

Related to myronmarston/vcr#169.
3fb913d
Myron Marston myronmarston Add a failing spec demonstrating a bug in the em-http-request adapter.
When a request is made to a URL that returns a 3xx response and the
:redirects option is set, the globally_stub_request/after_request
hooks are not paired properly.  Both hooks should receive the original
request and the redirect-following request.

This spec should probably be re-written to use the local webmock
server, but I couldn't figure out how to get it to conditionally
send a redirect response since it writes directly to the socket
and doesn't (as far as I can tell) have the request info available
in that scope...so there's not easy way to have it send a different
response for different requests :(.

See myronmarston/vcr#171 for the original VCR issue that caused
me to investigate this bug.
a42d463
Bartosz Blimke Merge branch 'master' into em_http_middleware_after_request_bug f40be82
Bartosz Blimke Merge branch 'master' into vcr-171 dc0e226
Bartosz Blimke Fixed em-http-adapter bug. When a request is made to a URL that retur…
…ns a 3xx response and the :redirects option is set, the globally_stub_request/after_request

hooks are now fired for the original request and the redirect-following request.
806818f
Bartosz Blimke Fixed problem with Net::HTTP::DigestAuth. All constants are set back …
…on original Net::HTTP, after WebMock is disabled, if any constants were added to Net::HTTP after WebMock was enabled.
1acfa58
Pawel Pierzchala Fixes problem with failing em-http-request with queries 2c92af6
Bartosz Blimke Merge pull request #210 from wrozka/master
em-http-request problems with queries
b7ebbab
Bartosz Blimke Ensured that all em-http-request specs are executed for em-http-reque…
…st 0.3.
f38d04f
Bartosz Blimke Made spec compatible with em-http-request 0.x adapter f86bdde
Bartosz Blimke Redirects support is only working for em-http-request 1.0.x 4036430
Bartosz Blimke Version 1.8.10 623cf85
Bartosz Blimke Fixed Net::HTTP adapter spec to be compatible with ruby 1.0 123974b
Bartosz Blimke Use blocking requests in Excon specs to pass on Jruby 86a0158
Myron Marston myronmarston Fix excon adapter to handle :body => some_file_object. f1a3293
Bartosz Blimke Merge pull request #213 from bblimke/fix_excon_file_uploads
Fix excon adapter to handle :body => some_file_object.
9915698
Bartosz Blimke Version 1.8.11 5662ca4
Tiago Ferreira Lima fltiago Adding method to compare two dates using json format. 8f01af0
Tiago Ferreira Lima fltiago Adding condition in matching_hashes to change the way that two dates …
…are compared
19670eb
Bartosz Blimke Merge pull request #212 from i0rek/typhoeus_0.5.0
Typhoeus 0.5.0
720f151
Bartosz Blimke Dependency on Typhoeus > 0.5 d52d0d4
Bartosz Blimke Upgrade to version 1.9.0 e2c2e27
Tiago Ferreira Lima fltiago Adding method to compare two dates using json format. 93e73d9
Tiago Ferreira Lima fltiago Adding condition in matching_hashes to change the way that two dates …
…are compared
153c57a
Tiago Ferreira Lima fltiago Merge branch 'master' of github.com:fltiago/webmock 7e34b7b
Bartosz Blimke
Owner

Is that not an issue anymore?

Tiago Ferreira Lima

It is. But I merged from master (bblimke/webmock) to my branch master (fltiago/webmock) to take the new commits, because I'm using my branch in my project, and a lot of commit that already had here were added to the pull. So, I will redo it with an branch that have the same name of my issue.

Do you have any other suggestions?

Bartosz Blimke
Owner

Ok. Looking forward to the new pull request :)

I was very busy recently, sorry for the delay with merging it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 25 unique commits by 4 authors.

May 15, 2012
Myron Marston myronmarston Add failing spec demonstrating em-http-request bug.
When a response modifying middleware is used with em-http-request, and a real request is made, the middleware can modify the response before the after_request is invoked. This prevents VCR from being able to record the response accurately.  The after_request hook should be invoked before the em-http-request middleware.

Related to myronmarston/vcr#169.
3fb913d
May 25, 2012
Myron Marston myronmarston Add a failing spec demonstrating a bug in the em-http-request adapter.
When a request is made to a URL that returns a 3xx response and the
:redirects option is set, the globally_stub_request/after_request
hooks are not paired properly.  Both hooks should receive the original
request and the redirect-following request.

This spec should probably be re-written to use the local webmock
server, but I couldn't figure out how to get it to conditionally
send a redirect response since it writes directly to the socket
and doesn't (as far as I can tell) have the request info available
in that scope...so there's not easy way to have it send a different
response for different requests :(.

See myronmarston/vcr#171 for the original VCR issue that caused
me to investigate this bug.
a42d463
Aug 26, 2012
Bartosz Blimke Merge branch 'master' into em_http_middleware_after_request_bug f40be82
Bartosz Blimke Merge branch 'master' into vcr-171 dc0e226
Bartosz Blimke Fixed em-http-adapter bug. When a request is made to a URL that retur…
…ns a 3xx response and the :redirects option is set, the globally_stub_request/after_request

hooks are now fired for the original request and the redirect-following request.
806818f
Bartosz Blimke Fixed problem with Net::HTTP::DigestAuth. All constants are set back …
…on original Net::HTTP, after WebMock is disabled, if any constants were added to Net::HTTP after WebMock was enabled.
1acfa58
Sep 06, 2012
Pawel Pierzchala Fixes problem with failing em-http-request with queries 2c92af6
Sep 09, 2012
Bartosz Blimke Merge pull request #210 from wrozka/master
em-http-request problems with queries
b7ebbab
Bartosz Blimke Ensured that all em-http-request specs are executed for em-http-reque…
…st 0.3.
f38d04f
Bartosz Blimke Made spec compatible with em-http-request 0.x adapter f86bdde
Bartosz Blimke Redirects support is only working for em-http-request 1.0.x 4036430
Bartosz Blimke Version 1.8.10 623cf85
Bartosz Blimke Fixed Net::HTTP adapter spec to be compatible with ruby 1.0 123974b
Bartosz Blimke Use blocking requests in Excon specs to pass on Jruby 86a0158
Sep 29, 2012
Myron Marston myronmarston Fix excon adapter to handle :body => some_file_object. f1a3293
Bartosz Blimke Merge pull request #213 from bblimke/fix_excon_file_uploads
Fix excon adapter to handle :body => some_file_object.
9915698
Bartosz Blimke Version 1.8.11 5662ca4
Oct 11, 2012
Tiago Ferreira Lima fltiago Adding method to compare two dates using json format. 8f01af0
Tiago Ferreira Lima fltiago Adding condition in matching_hashes to change the way that two dates …
…are compared
19670eb
Nov 07, 2012
Bartosz Blimke Merge pull request #212 from i0rek/typhoeus_0.5.0
Typhoeus 0.5.0
720f151
Bartosz Blimke Dependency on Typhoeus > 0.5 d52d0d4
Bartosz Blimke Upgrade to version 1.9.0 e2c2e27
Nov 19, 2012
Tiago Ferreira Lima fltiago Adding method to compare two dates using json format. 93e73d9
Tiago Ferreira Lima fltiago Adding condition in matching_hashes to change the way that two dates …
…are compared
153c57a
Tiago Ferreira Lima fltiago Merge branch 'master' of github.com:fltiago/webmock 7e34b7b
This page is out of date. Refresh to see the latest.
27 CHANGELOG.md
Source Rendered
... ... @@ -1,5 +1,32 @@
1 1 # Changelog
2 2
  3 +## 1.9.0
  4 +
  5 +* Added support for Typhoeus >= 0.5.0 and removed support for Typhoeus < 0.5.0.
  6 +
  7 + Thanks to [Hans Hasselberg](https://github.com/i0rek)
  8 +
  9 +## 1.8.11
  10 +
  11 +* Fix excon adapter to handle `:body => some_file_object`
  12 +
  13 + Thanks to [Myron Marston](https://github.com/myronmarston)
  14 +
  15 +## 1.8.10
  16 +
  17 +* em-http-request fix. After request callbacks are correctly invoked for 3xx responses,
  18 + when :redirects option is set.
  19 +
  20 + Thanks to [Myron Marston](https://github.com/myronmarston) for reporting that issue.
  21 +
  22 +* Fixed compatibility with Net::HTTP::DigestAuth
  23 +
  24 + Thanks to [Jonathan Hyman](https://github.com/jonhyman) for reporting that issue.
  25 +
  26 +* Fixed problem in em-http-request 0.x appending the query to the client URI twice.
  27 +
  28 + Thanks to [Paweł Pierzchała](https://github.com/wrozka)
  29 +
3 30 ## 1.8.9
4 31
5 32 * Fixed problem with caching nil responses when the same HTTPClient instance is used.
1  Gemfile
@@ -10,7 +10,6 @@ group :development do
10 10 gem 'rake'
11 11 gem 'guard-rspec'
12 12 gem 'rb-fsevent'
13   - gem "typhoeus", git: "git@github.com:typhoeus/typhoeus.git"
14 13 end
15 14
16 15 group :test do
1  README.md
Source Rendered
@@ -713,6 +713,7 @@ People who submitted patches and new features or suggested improvements. Many th
713 713 * Kevin Glowacz
714 714 * Hans Hasselberg
715 715 * Andrew France
  716 +* Jonathan Hyman
716 717
717 718 For a full list of contributors you can visit the
718 719 [contributors](https://github.com/bblimke/webmock/contributors) page.
2  Rakefile
@@ -27,7 +27,7 @@ end
27 27
28 28
29 29 task :em_http_request_0_x_spec do
30   - sh "EM_HTTP_REQUEST_0_X=true bundle install && bundle exec rspec spec/acceptance/em_http_request/em_http_request_spec.rb" if RUBY_VERSION <= "1.8.7"
  30 + sh "EM_HTTP_REQUEST_0_X=true bundle install && EM_HTTP_REQUEST_0_X=true bundle exec rspec spec/acceptance/em_http_request/em_http_request_spec.rb" if RUBY_VERSION <= "1.8.7"
31 31 end
32 32
33 33 require 'rake/testtask'
1  lib/webmock.rb
@@ -15,6 +15,7 @@
15 15 require 'webmock/util/hash_keys_stringifier'
16 16 require 'webmock/util/json'
17 17 require 'webmock/util/version_checker'
  18 +require 'webmock/util/date_comparator'
18 19
19 20 require 'webmock/matchers/hash_including_matcher'
20 21
4 lib/webmock/http_lib_adapters/em_http_request/em_http_request_0_x.rb
@@ -90,11 +90,11 @@ def build_request_signature
90 90 if @req
91 91 options = @req.options
92 92 method = @req.method
93   - uri = @req.uri
  93 + uri = @req.uri.dup
94 94 else
95 95 options = @options
96 96 method = @method
97   - uri = @uri
  97 + uri = @uri.dup
98 98 end
99 99
100 100 if options[:authorization] || options['authorization']
6 lib/webmock/http_lib_adapters/em_http_request/em_http_request_1_x.rb
@@ -108,14 +108,16 @@ def send_request(head, body)
108 108 end
109 109 end
110 110
111   - def set_deferred_status(status, *args)
112   - if status == :succeeded && !stubbed_webmock_response && WebMock::CallbackRegistry.any_callbacks?
  111 + def unbind(reason = nil)
  112 + if !stubbed_webmock_response && WebMock::CallbackRegistry.any_callbacks?
113 113 webmock_response = build_webmock_response
114 114 WebMock::CallbackRegistry.invoke_callbacks(
115 115 {:lib => :em_http_request, :real_request => true},
116 116 request_signature,
117 117 webmock_response)
118 118 end
  119 + @request_signature = nil
  120 + remove_instance_variable(:@stubbed_webmock_response)
119 121
120 122 super
121 123 end
11 lib/webmock/http_lib_adapters/excon_adapter.rb
@@ -43,7 +43,16 @@ def self.build_request(params)
43 43 method = (params.delete(:method) || :get).to_s.downcase.to_sym
44 44 params[:query] = to_query(params[:query]) if params[:query].is_a?(Hash)
45 45 uri = Addressable::URI.new(params).to_s
46   - WebMock::RequestSignature.new method, uri, :body => params[:body], :headers => params[:headers]
  46 + WebMock::RequestSignature.new method, uri, :body => body_from(params), :headers => params[:headers]
  47 + end
  48 +
  49 + def self.body_from(params)
  50 + body = params[:body]
  51 + return body unless body.respond_to?(:read)
  52 +
  53 + contents = body.read
  54 + body.rewind if body.respond_to?(:rewind)
  55 + contents
47 56 end
48 57
49 58 def self.real_response(mock)
12 lib/webmock/http_lib_adapters/net_http.rb
@@ -28,6 +28,16 @@ def self.disable!
28 28 Net.send(:const_set, :HTTP, OriginalNetHTTP)
29 29 Net.send(:const_set, :HTTPSession, OriginalNetHTTP)
30 30 Net.send(:const_set, :BufferedIO, OriginalNetBufferedIO)
  31 +
  32 + #copy all constants from @webMockNetHTTP to original Net::HTTP
  33 + #in case any constants were added to @webMockNetHTTP instead of Net::HTTP
  34 + #after WebMock was enabled.
  35 + #i.e Net::HTTP::DigestAuth
  36 + @webMockNetHTTP.constants.each do |constant|
  37 + if !OriginalNetHTTP.constants.map(&:to_s).include?(constant.to_s)
  38 + OriginalNetHTTP.send(:const_set, constant, @webMockNetHTTP.const_get(constant))
  39 + end
  40 + end
31 41 end
32 42
33 43 @webMockNetHTTP = Class.new(Net::HTTP) do
@@ -56,7 +66,7 @@ def const_get(name, inherit=true)
56 66
57 67 if Module.method(:constants).arity != 0
58 68 def constants(inherit=true)
59   - super + self.superclass.constants(inherit)
  69 + (super + self.superclass.constants(inherit)).uniq
60 70 end
61 71 end
62 72 end
10 lib/webmock/request_pattern.rb
@@ -237,7 +237,11 @@ def matching_hashes?(query_parameters, pattern)
237 237 if actual.is_a?(Hash) && expected.is_a?(Hash)
238 238 return false unless matching_hashes?(actual, expected)
239 239 else
240   - return false unless expected === actual
  240 + if is_kind_of_date?(expected)
  241 + return false unless WebMock::Util::DateComparator.compare(actual, expected)
  242 + else
  243 + return false unless expected === actual
  244 + end
241 245 end
242 246 end
243 247 true
@@ -251,6 +255,10 @@ def normalize_hash(hash)
251 255 Hash[WebMock::Util::HashKeysStringifier.stringify_keys!(hash).sort]
252 256 end
253 257
  258 + def is_kind_of_date?(date)
  259 + date.is_a?(Date) || date.is_a?(DateTime) || date.is_a?(Time)
  260 + end
  261 +
254 262 end
255 263
256 264 class HeadersPattern
9 lib/webmock/util/date_comparator.rb
... ... @@ -0,0 +1,9 @@
  1 +module WebMock
  2 + module Util
  3 + class Util::DateComparator
  4 + def self.compare(date1, date2)
  5 + date1.to_json === date2.to_json
  6 + end
  7 + end
  8 + end
  9 +end
2  lib/webmock/version.rb
... ... @@ -1,3 +1,3 @@
1 1 module WebMock
2   - VERSION = '1.8.9' unless defined?(::WebMock::VERSION)
  2 + VERSION = '1.9.0' unless defined?(::WebMock::VERSION)
3 3 end
78 spec/acceptance/em_http_request/em_http_request_spec.rb
@@ -13,6 +13,39 @@
13 13
14 14 #functionality only supported for em-http-request 1.x
15 15 if defined?(EventMachine::HttpConnection)
  16 + context 'when a real request is made and redirects are followed' do
  17 + before { WebMock.allow_net_connect! }
  18 +
  19 + # This url redirects to the https URL.
  20 + let(:http_url) { "http://raw.github.com:80/gist/fb555cb593f3349d53af/6921dd638337d3f6a51b0e02e7f30e3c414f70d6/vcr_gist" }
  21 + let(:https_url) { http_url.gsub('http', 'https').gsub('80', '443') }
  22 +
  23 + def make_request
  24 + EM.run do
  25 + request = EM::HttpRequest.new(http_url).get(:redirects => 1)
  26 + request.callback { EM.stop }
  27 + end
  28 + end
  29 +
  30 + it "invokes the globally_stub_request hook with both requests" do
  31 + urls = []
  32 + WebMock.globally_stub_request { |r| urls << r.uri.to_s; nil }
  33 +
  34 + make_request
  35 +
  36 + urls.should eq([http_url, https_url])
  37 + end
  38 +
  39 + it 'invokes the after_request hook with both requests' do
  40 + urls = []
  41 + WebMock.after_request { |req, res| urls << req.uri.to_s }
  42 +
  43 + make_request
  44 +
  45 + urls.should eq([http_url, https_url])
  46 + end
  47 + end
  48 +
16 49 describe "with middleware" do
17 50
18 51 it "should work with request middleware" do
@@ -38,19 +71,21 @@ def request(client, head, body)
38 71 end
39 72 end
40 73
41   - it "should work with response middleware" do
42   - stub_request(:get, "www.example.com").to_return(:body => 'foo')
43   -
44   - middleware = Class.new do
  74 + let(:response_middleware) do
  75 + Class.new do
45 76 def response(resp)
46 77 resp.response = 'bar'
47 78 end
48 79 end
  80 + end
  81 +
  82 + it "should work with response middleware" do
  83 + stub_request(:get, "www.example.com").to_return(:body => 'foo')
49 84
50 85 EM.run do
51 86 conn = EventMachine::HttpRequest.new('http://www.example.com/')
52 87
53   - conn.use middleware
  88 + conn.use response_middleware
54 89
55 90 http = conn.get
56 91
@@ -60,6 +95,36 @@ def response(resp)
60 95 end
61 96 end
62 97 end
  98 +
  99 + let(:webmock_server_url) { "http://#{WebMockServer.instance.host_with_port}/" }
  100 +
  101 + shared_examples_for "em-http-request middleware/after_request hook integration" do
  102 + it 'yields the original raw body to the after_request hook even if a response middleware modifies the body' do
  103 + yielded_response_body = nil
  104 + ::WebMock.after_request do |request, response|
  105 + yielded_response_body = response.body
  106 + end
  107 +
  108 + EM::HttpRequest.use response_middleware
  109 +
  110 + EM.run do
  111 + http = EventMachine::HttpRequest.new(webmock_server_url).get
  112 + http.callback { EM.stop }
  113 + end
  114 +
  115 + yielded_response_body.should eq("hello world")
  116 + end
  117 + end
  118 +
  119 + context 'making a real request' do
  120 + before { WebMock.allow_net_connect! }
  121 + include_examples "em-http-request middleware/after_request hook integration"
  122 + end
  123 +
  124 + context 'when the request is stubbed' do
  125 + before { stub_request(:get, webmock_server_url).to_return(:body => 'hello world') }
  126 + include_examples "em-http-request middleware/after_request hook integration"
  127 + end
63 128 end
64 129
65 130 # not pretty, but it works
@@ -174,7 +239,8 @@ def client(uri, options = {})
174 239
175 240 it "#request_signature doesn't mutate the original uri" do
176 241 subject.uri.should == Addressable::URI.parse("http://www.example.com/?a=1")
177   - subject.request_signature.uri.should == Addressable::URI.parse(uri)
  242 + signature = WebMock::RequestRegistry.instance.requested_signatures.hash.keys.first
  243 + signature.uri.should == Addressable::URI.parse(uri)
178 244 end
179 245 end
180 246 end
15 spec/acceptance/excon/excon_spec.rb
@@ -11,5 +11,20 @@
11 11 Excon.get('http://example.com', :path => "resource/", :query => {:a => 1, :b => 2}).body.should == "abc"
12 12 end
13 13
  14 + let(:file) { File.new(__FILE__) }
  15 + let(:file_contents) { File.new(__FILE__).read }
  16 +
  17 + it 'handles file uploads correctly' do
  18 + stub_request(:put, "http://example.com/upload").with(:body => file_contents)
  19 +
  20 + yielded_request_body = nil
  21 + WebMock.after_request do |req, res|
  22 + yielded_request_body = req.body
  23 + end
  24 +
  25 + Excon.put("http://example.com", :path => "upload", :body => file)
  26 +
  27 + yielded_request_body.should eq(file_contents)
  28 + end
14 29 end
15 30
2  spec/acceptance/excon/excon_spec_helper.rb
@@ -7,7 +7,7 @@ def http_request(method, uri, options = {}, &block)
7 7 uri = Addressable::URI.heuristic_parse(uri)
8 8 uri = uri.omit(:userinfo).to_s.gsub(' ', '+')
9 9
10   - options = options.merge(:method => method) # Dup and merge
  10 + options = options.merge(:method => method, :nonblock => false) # Dup and merge
11 11 response = Excon.new(uri).request(options, &block)
12 12
13 13 headers = WebMock::Util::Headers.normalize_headers(response.headers)
13 spec/acceptance/net_http/net_http_spec.rb
@@ -86,6 +86,19 @@ class TestMarshalingInWebMockNetHTTP
86 86 Object.const_get("Net").const_get("HTTP").constants(false).map(&:to_s).should include("Get")
87 87 end
88 88 end
  89 +
  90 + describe "after WebMock is disabled" do
  91 + after(:each) do
  92 + WebMock.enable!
  93 + end
  94 + it "Net::HTTP should have the same constants" do
  95 + orig_consts_number = WebMock::HttpLibAdapters::NetHttpAdapter::OriginalNetHTTP.constants.size
  96 + Net::HTTP.send(:const_set, "TEST_CONST", 10)
  97 + Net::HTTP.constants.size.should == orig_consts_number + 1
  98 + WebMock.disable!
  99 + Net::HTTP.constants.size.should == orig_consts_number + 1
  100 + end
  101 + end
89 102 end
90 103
91 104 it "should work with block provided" do
11 spec/acceptance/shared/request_expectations.rb
... ... @@ -1,3 +1,5 @@
  1 +require 'json'
  2 +
1 3 shared_context "request expectations" do |*adapter_info|
2 4 describe "when request expectations are set" do
3 5 describe "when net connect is not allowed" do
@@ -258,6 +260,15 @@
258 260 }.should_not raise_error
259 261 end
260 262
  263 + it "should satisfy expectation even if json had date in the content" do
  264 + body_hash['date'] = Date.today
  265 + lambda {
  266 + http_request(:post, "http://www.example.com/", :headers => {'Content-Type' => 'application/json'},
  267 + :body => body_hash.to_json)
  268 + a_request(:post, "www.example.com").with(:body => body_hash).should have_been_made
  269 + }.should_not raise_error
  270 + end
  271 +
261 272 it "should satisfy expectation even if json body contains date string" do
262 273 lambda {
263 274 http_request(:post, "http://www.example.com/", :headers => {'Content-Type' => 'application/json'},
2  webmock.gemspec
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23 23 s.add_development_dependency 'em-http-request', '>= 1.0.2'
24 24 s.add_development_dependency 'em-synchrony', '>= 1.0.0' if RUBY_VERSION >= "1.9"
25 25 s.add_development_dependency 'curb', '>= 0.8.0' unless RUBY_PLATFORM =~ /java/
26   - s.add_development_dependency 'typhoeus', '>= 0.3.3' unless RUBY_PLATFORM =~ /java/
  26 + s.add_development_dependency 'typhoeus', '>= 0.5.0' unless RUBY_PLATFORM =~ /java/
27 27 s.add_development_dependency 'excon', '>= 0.11.0'
28 28 s.add_development_dependency 'minitest', '>= 2.2.2'
29 29 s.add_development_dependency 'rdoc', ((RUBY_VERSION == '1.8.6') ? '<= 3.5.0' : '>3.5.0')

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.