more verbose exception when RequestFailed for apientreprise occurs

This commit is contained in:
Christophe Robillard 2020-06-11 17:24:45 +02:00
parent d3fc810d23
commit f9b1b8217a

View file

@ -78,7 +78,7 @@ class ApiEntreprise::API
elsif response.code == 400 elsif response.code == 400
raise BadFormatRequest, "url: #{url}" raise BadFormatRequest, "url: #{url}"
else else
raise RequestFailed, "HTTP Error Code: #{response.code} for #{url}" raise RequestFailed, "HTTP Error Code: #{response.code} for #{url}\nheaders: #{response.headers}\nbody: #{response.body}"
end end
end end