From 541c24b23d09917dc841c51ea6225c76bc074c0b Mon Sep 17 00:00:00 2001 From: Shaun McDonald Date: Fri, 12 Dec 2008 11:24:40 +0000 Subject: [PATCH] capture the too many way nodes error, and give the user an error message --- app/controllers/amf_controller.rb | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.43.2