Merge pull request #5259 from betagouv/verbose_api_entreprise_exceptions

more verbose exception when RequestFailed for apientreprise occurs
This commit is contained in:
krichtof 2020-06-11 17:37:46 +02:00 committed by GitHub
commit 51c0c83860
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,7 +78,7 @@ class ApiEntreprise::API
elsif response.code == 400
raise BadFormatRequest, "url: #{url}"
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