carto: handle more "API unavailable" errors

This commit is contained in:
Pierre de La Morinerie 2019-01-24 18:32:00 +01:00
parent 803364490d
commit 00d3cbc182

View file

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