Skip to content
Browse files

include additional staging error output

Change-Id: I349d63e345d8da4da7673a54a55d99d00fefcb01
  • Loading branch information...
1 parent db17a45 commit 4037e41c4299450608ba910ca365de5d49ae8413 Dmitriy Kalinin and Kowshik Prakasam committed with Alex Suraci and Dmitriy Kalinin Feb 25, 2013
View
2 lib/cloud_controller/app_stager.rb
@@ -153,7 +153,7 @@ def staging_error!(response, error)
msg = "failed to stage application:\n#{error}"
raise Errors::StagingError, msg
elsif response["error"]
- msg = "failed to stage application:\n#{response["error"]}"
+ msg = "failed to stage application:\n#{response["error"]}\n#{response["task_log"]}"
raise Errors::StagingError, msg
end
end
View
5 lib/cloud_controller/multi_response_nats_request.rb
@@ -41,7 +41,8 @@ def handle_received_response(response)
begin
parsed_response = Yajl.load(response)
rescue Yajl::ParseError => e
- error = Error.new("Failed decoding response: #{e}\n#{e.backtrace}")
+ logger.info("Failed decoding response: #{e}\n#{e.backtrace}")
+ error = Error.new("Internal error: failed to decode response")
end
timeout_request
@@ -62,7 +63,7 @@ def timeout_request
@timeout = EM.add_timer(secs) do
unsubscribe
- trigger_on_response(nil, Error.new("Timed out"))
+ trigger_on_response(nil, Error.new("Operation timed out"))
end
end
end
View
4 spec/multi_response_nats_request_spec.rb
@@ -65,7 +65,7 @@
last_response.should be_nil
last_error.should be_a(described_class::Error)
- last_error.message.should match /Timed out/
+ last_error.message.should match /timed out/
end
it "does not accept responses after the specified timeout for subsequent requests" do
@@ -118,7 +118,7 @@
last_response.should be_nil
last_error.should be_a(described_class::Error)
- last_error.message.should match /Failed decoding response/
+ last_error.message.should match /failed to decode response/
end
it "notifies second callback with second response" do

0 comments on commit 4037e41

Please sign in to comment.
Something went wrong with that request. Please try again.