From 3b46594e606e99604264b7f76da0bc59ff605ea7 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Mon, 18 May 2020 15:59:35 +0200 Subject: [PATCH] precise http error code for api calls --- 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 884cb1a3c..52a9e73a2 100644 --- a/app/lib/api_entreprise/api.rb +++ b/app/lib/api_entreprise/api.rb @@ -73,7 +73,7 @@ class ApiEntreprise::API elsif response.code&.between?(401, 499) raise ResourceNotFound else - raise RequestFailed + raise RequestFailed, "HTTP Error Code: #{response.code}" end end