Fix error when passing unknown filter param in REST API (#20626)

Fix #19156
This commit is contained in:
Eugen Rochko
2022-11-14 08:06:06 +01:00
committed by GitHub
parent 5c826c408d
commit b31afc6294
16 changed files with 31 additions and 28 deletions

View File

@ -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