mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 00:08:46 +00:00
Merge commit 'ffeb5da9912a3b7db0deb8aec429e661ef609c59' into glitch-soc/merge-upstream
This commit is contained in:
@@ -19,7 +19,7 @@ class Api::V1::Statuses::QuotesController < Api::V1::Statuses::BaseController
|
||||
|
||||
RevokeQuoteService.new.call(@quote)
|
||||
|
||||
render_empty # TODO: do we want to return something? an updated status?
|
||||
render json: @quote.status, serializer: REST::StatusSerializer
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -20,7 +20,7 @@ class Api::V2::SearchController < Api::BaseController
|
||||
@search = Search.new(search_results)
|
||||
render json: @search, serializer: REST::SearchSerializer
|
||||
rescue Mastodon::SyntaxError
|
||||
unprocessable_entity
|
||||
unprocessable_content
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
not_found
|
||||
end
|
||||
|
||||
@@ -31,7 +31,7 @@ class ApplicationController < ActionController::Base
|
||||
rescue_from Mastodon::NotPermittedError, with: :forbidden
|
||||
rescue_from ActionController::RoutingError, ActiveRecord::RecordNotFound, with: :not_found
|
||||
rescue_from ActionController::UnknownFormat, with: :not_acceptable
|
||||
rescue_from ActionController::InvalidAuthenticityToken, with: :unprocessable_entity
|
||||
rescue_from ActionController::InvalidAuthenticityToken, with: :unprocessable_content
|
||||
rescue_from Mastodon::RateLimitExceededError, with: :too_many_requests
|
||||
|
||||
rescue_from(*Mastodon::HTTP_CONNECTION_ERRORS, with: :internal_server_error)
|
||||
@@ -126,7 +126,7 @@ class ApplicationController < ActionController::Base
|
||||
respond_with_error(410)
|
||||
end
|
||||
|
||||
def unprocessable_entity
|
||||
def unprocessable_content
|
||||
respond_with_error(422)
|
||||
end
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ module Settings
|
||||
end
|
||||
else
|
||||
flash[:error] = I18n.t('webauthn_credentials.create.error')
|
||||
status = :unprocessable_entity
|
||||
status = :unprocessable_content
|
||||
end
|
||||
else
|
||||
flash[:error] = t('webauthn_credentials.create.error')
|
||||
|
||||
Reference in New Issue
Block a user