about summary refs log tree commit diff
path: root/app/controllers/api
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-11-14 08:06:06 +0100
committerGitHub <noreply@github.com>2022-11-14 08:06:06 +0100
commitb31afc62943b79bf97338040e39123b9dd68f31f (patch)
treef6d442f3e51147e365e1197e07c3e6548a1d4992 /app/controllers/api
parent5c826c408db86c3b4abf4959c092ad4c5c807896 (diff)
Fix error when passing unknown filter param in REST API (#20626)
Fix #19156
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/base_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api/base_controller.rb b/app/controllers/api/base_controller.rb
index 3f3e1ca7b..665425f29 100644
--- a/app/controllers/api/base_controller.rb
+++ b/app/controllers/api/base_controller.rb
@@ -57,7 +57,7 @@ class Api::BaseController < ApplicationController
     render json: { error: I18n.t('errors.429') }, status: 429
   end
 
-  rescue_from ActionController::ParameterMissing do |e|
+  rescue_from ActionController::ParameterMissing, Mastodon::InvalidParameterError do |e|
     render json: { error: e.to_s }, status: 400
   end