mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-22 02:03:18 +00:00
Fix error when passing unknown filter param in REST API (#20626)
Fix #19156
This commit is contained in:
parent
5c826c408d
commit
b31afc6294
16 changed files with 31 additions and 28 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue