From: Shaun McDonald Date: Fri, 12 Dec 2008 11:24:40 +0000 (+0000) Subject: capture the too many way nodes error, and give the user an error message X-Git-Tag: live~7604^2~101 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/541c24b23d09917dc841c51ea6225c76bc074c0b capture the too many way nodes error, and give the user an error message --- diff --git a/app/controllers/amf_controller.rb b/app/controllers/amf_controller.rb index d040a51bb..706180557 100644 --- a/app/controllers/amf_controller.rb +++ b/app/controllers/amf_controller.rb @@ -588,6 +588,8 @@ class AmfController < ApplicationController # last version was in the same changeset, or belongs to the same user, then # we can return something different return [-3, "You have taken too long to edit, please reload the area"] + rescue OSM::APITooManyWayNodesError => ex + return [-1, "You have tried to upload a way with #{ex.provided}, however only #{ex.max} are allowed."] rescue OSM::APIAlreadyDeletedError => ex return [-1, "The object has already been deleted"] rescue OSM::APIError => ex