diff --git a/app/api/api_root.rb b/app/api/api_root.rb index 53435e1e3..a0dbcfc4c 100644 --- a/app/api/api_root.rb +++ b/app/api/api_root.rb @@ -33,6 +33,9 @@ class ApiRoot < Grape::API when ActionController::ParameterMissing message = "Missing value for #{e.param}" status = 400 + when ActiveRecord::ConnectionTimeoutError + message = 'There is currently high load on the system. Please wait a moment and try again.' + status = 503 else # rubocop:disable Rails/Output puts e.inspect unless Rails.env.production?