Rename Mastodon::RejectPayload to Mastodon::RejectPayloadError to match naming scheme for ValidationErrors

This commit is contained in:
Jeremy Kescher 2024-09-20 11:56:27 +02:00
parent 655d28f6a7
commit 566205ab1c
No known key found for this signature in database
GPG key ID: 80A419A7A613DFA4
2 changed files with 3 additions and 3 deletions

View file

@ -14,7 +14,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
else
create_status
end
rescue Mastodon::RejectPayload
rescue Mastodon::RejectPayloadError
reject_payload!
end
@ -86,7 +86,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
process_status_params
raise Mastodon::RejectPayload if MediaAttachment.where(id: @params[:media_attachment_ids]).where(blurhash: Setting.reject_blurhash.split(/\r?\n/).filter(&:present?).uniq).present?
raise Mastodon::RejectPayloadError if MediaAttachment.where(id: @params[:media_attachment_ids]).where(blurhash: Setting.reject_blurhash.split(/\r?\n/).filter(&:present?).uniq).present?
process_tags
process_audience

View file

@ -8,7 +8,7 @@ module Mastodon
class LengthValidationError < ValidationError; end
class DimensionsValidationError < ValidationError; end
class StreamValidationError < ValidationError; end
class RejectPayload < ValidationError; end
class RejectPayloadError < ValidationError; end
class FilterValidationError < ValidationError; end
class RaceConditionError < Error; end
class RateLimitExceededError < Error; end