precise http error code for api calls

This commit is contained in:
Christophe Robillard 2020-05-18 15:59:35 +02:00
parent 013e78ce4e
commit 3b46594e60

View file

@ -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