From 00d3cbc1826a24549b1ed242365fb29f2dbb2cfe Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Thu, 24 Jan 2019 18:32:00 +0100 Subject: [PATCH] carto: handle more "API unavailable" errors --- app/lib/api_carto/api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/api_carto/api.rb b/app/lib/api_carto/api.rb index 651cc97eb..84bcd5d70 100644 --- a/app/lib/api_carto/api.rb +++ b/app/lib/api_carto/api.rb @@ -15,7 +15,7 @@ class ApiCarto::API params = geojson.to_s RestClient.post(url, params, content_type: 'application/json') - rescue RestClient::InternalServerError => e + rescue RestClient::InternalServerError, RestClient::BadGateway, RestClient::GatewayTimeout => e Rails.logger.error "[ApiCarto] Error on #{url}: #{e}" raise RestClient::ResourceNotFound end