X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/fa13a11a94a96e47582483503753ced3db438f6f..044febd3aae31713ff60938333766c45c788e62d:/app/controllers/api_controller.rb diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index ec5674e94..318719219 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -3,6 +3,7 @@ class ApiController < ApplicationController session :off before_filter :check_api_readable, :except => [:capabilities] after_filter :compress_output + around_filter :api_call_handle_error, :api_call_timeout # Help methods for checking boundary sanity and area size include MapBoundary @@ -262,6 +263,9 @@ class ApiController < ApplicationController changesets = XML::Node.new 'changesets' changesets['maximum_elements'] = Changeset::MAX_ELEMENTS.to_s api << changesets + timeout = XML::Node.new 'timeout' + timeout['seconds'] = APP_CONFIG['api_timeout'].to_s + api << timeout doc.root << api