summaryrefslogtreecommitdiff
path: root/spec/support/shared/unit/api_error_inspector.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared/unit/api_error_inspector.rb')
-rw-r--r--spec/support/shared/unit/api_error_inspector.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/support/shared/unit/api_error_inspector.rb b/spec/support/shared/unit/api_error_inspector.rb
index 15c122e3dc..92ed9fcb99 100644
--- a/spec/support/shared/unit/api_error_inspector.rb
+++ b/spec/support/shared/unit/api_error_inspector.rb
@@ -71,7 +71,7 @@ shared_examples_for "an api error inspector" do
@response_body = "synchronize the clock on your host"
@response = Net::HTTPUnauthorized.new("1.1", "401", "(response) unauthorized")
allow(@response).to receive(:body).and_return(@response_body)
- @exception = Net::HTTPServerException.new("(exception) unauthorized", @response)
+ @exception = Net::HTTPClientException.new("(exception) unauthorized", @response)
@inspector = described_class.new(@node_name, @exception, @config)
@inspector.add_explanation(@description)
end
@@ -87,7 +87,7 @@ shared_examples_for "an api error inspector" do
@response_body = "check your key and node name"
@response = Net::HTTPUnauthorized.new("1.1", "401", "(response) unauthorized")
allow(@response).to receive(:body).and_return(@response_body)
- @exception = Net::HTTPServerException.new("(exception) unauthorized", @response)
+ @exception = Net::HTTPClientException.new("(exception) unauthorized", @response)
@inspector = described_class.new(@node_name, @exception, @config)
@inspector.add_explanation(@description)
end
@@ -103,7 +103,7 @@ shared_examples_for "an api error inspector" do
@response_body = "forbidden"
@response = Net::HTTPForbidden.new("1.1", "403", "(response) forbidden")
allow(@response).to receive(:body).and_return(@response_body)
- @exception = Net::HTTPServerException.new("(exception) forbidden", @response)
+ @exception = Net::HTTPClientException.new("(exception) forbidden", @response)
@inspector = described_class.new(@node_name, @exception, @config)
@inspector.add_explanation(@description)
end
@@ -119,7 +119,7 @@ shared_examples_for "an api error inspector" do
@response_body = "didn't like your data"
@response = Net::HTTPBadRequest.new("1.1", "400", "(response) bad request")
allow(@response).to receive(:body).and_return(@response_body)
- @exception = Net::HTTPServerException.new("(exception) bad request", @response)
+ @exception = Net::HTTPClientException.new("(exception) bad request", @response)
@inspector = described_class.new(@node_name, @exception, @config)
@inspector.add_explanation(@description)
end
@@ -135,7 +135,7 @@ shared_examples_for "an api error inspector" do
@response_body = "probably caused by a redirect to a get"
@response = Net::HTTPNotFound.new("1.1", "404", "(response) not found")
allow(@response).to receive(:body).and_return(@response_body)
- @exception = Net::HTTPServerException.new("(exception) not found", @response)
+ @exception = Net::HTTPClientException.new("(exception) not found", @response)
@inspector = described_class.new(@node_name, @exception, @config)
@inspector.add_explanation(@description)
end