aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorAlban Peignier2018-05-16 15:42:24 +0200
committerGitHub2018-05-16 15:42:24 +0200
commit223d988ef59e562b201cac8391c397630c8953e5 (patch)
treeecb43cdf1e461e621f8e5c22c5e5fdc2cd70b18d /app
parent6f4d2a1954fa3b127785127e30f757f654fe20c7 (diff)
parent9c442cd66c7d12266ba53e85949f775f6b842d2d (diff)
downloadchouette-core-223d988ef59e562b201cac8391c397630c8953e5.tar.bz2
Merge pull request #553 from af83/6884-tomtom-matrix--handle-error-when-response-doesn,t-inclu
Handle API error(s) in Tomtom matrix. Fixes #6884
Diffstat (limited to 'app')
-rw-r--r--app/services/route_way_cost_calculator.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/route_way_cost_calculator.rb b/app/services/route_way_cost_calculator.rb
index d41a2e59a..ca47a6772 100644
--- a/app/services/route_way_cost_calculator.rb
+++ b/app/services/route_way_cost_calculator.rb
@@ -8,5 +8,7 @@ class RouteWayCostCalculator
way_costs = TomTom.matrix(way_costs)
way_costs = WayCostCollectionJSONSerializer.dump(way_costs)
@route.update(costs: way_costs)
+ rescue TomTom::Errors::MatrixRemoteError => e
+ Rails.logger.error "TomTom::Matrix server error: #{e}"
end
end