Exception: Common::Exceptions::MessageAuthenticityError

Inherits:
BaseError
  • Object
show all
Defined in:
lib/common/exceptions/message_authenticity_error.rb

Overview

Message Authenticity Error - When a message with a signature cannot be verified

Instance Method Summary collapse

Methods inherited from BaseError

#log_to_sentry?, #message, #sentry_type, #status_code

Constructor Details

#initialize(options = {}) ⇒ MessageAuthenticityError

Returns a new instance of MessageAuthenticityError.



10
11
12
13
# File 'lib/common/exceptions/message_authenticity_error.rb', line 10

def initialize(options = {})
  @raw_post = options[:raw_post]
  @signature = options[:signature]
end

Instance Method Details

#errorsObject



15
16
17
18
19
# File 'lib/common/exceptions/message_authenticity_error.rb', line 15

def errors
  Array(SerializableError.new(i18n_data.merge(source: 'AWS SNS Verification', meta: {
                                                raw_post: @raw_post, signature: @signature
                                              })))
end