Commit 41b35608 authored by Samir Noir's avatar Samir Noir 🧀
Browse files

Fix the message sent to client when a http request to an upstream fail

The Ruby object was sent in the response instead of the body
parent ce79581e
......@@ -145,7 +145,7 @@ class ApplicationController < ActionController::Base
when 503
raise ServerUnavailable, msg
else
raise ServerError, "Request to #{http.uri.to_s} failed with status #{status}: #{http}"
raise ServerError, "Request to #{http.uri.to_s} failed with status #{status}: #{http.body}"
Rails.logger.error msg
end
......@@ -173,7 +173,7 @@ class ApplicationController < ActionController::Base
when 503
raise ServerUnavailable, msg
else
raise ServerError, "Request to #{http.uri.to_s} failed with unexpected status #{status}: #{http} ; could be a TLS problem"
raise ServerError, "Request to #{http.uri.to_s} failed with unexpected status #{status}: #{http.body} ; could be a TLS problem"
end
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment