Merge pull request #3380 from betagouv/rescue-more-carto-errors
carto: properly handle RestClient::ServiceUnavailable exceptions
This commit is contained in:
commit
86939196e7
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ class ApiCarto::API
|
|||
params = geojson.to_s
|
||||
RestClient.post(url, params, content_type: 'application/json')
|
||||
|
||||
rescue RestClient::InternalServerError, RestClient::BadGateway, RestClient::GatewayTimeout => e
|
||||
rescue RestClient::InternalServerError, RestClient::BadGateway, RestClient::GatewayTimeout, RestClient::ServiceUnavailable => e
|
||||
Rails.logger.error "[ApiCarto] Error on #{url}: #{e}"
|
||||
raise RestClient::ResourceNotFound
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue