From f9b1b8217ac0f01113f151250ac30c8eba3f4e0e Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Thu, 11 Jun 2020 17:24:45 +0200 Subject: [PATCH] more verbose exception when RequestFailed for apientreprise occurs --- app/lib/api_entreprise/api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/api_entreprise/api.rb b/app/lib/api_entreprise/api.rb index 17725743a..b302ac2b9 100644 --- a/app/lib/api_entreprise/api.rb +++ b/app/lib/api_entreprise/api.rb @@ -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