Exception: Ovh::Http2sms::SenderNotFoundError

Inherits:
Error
  • Object
show all
Defined in:
lib/ovh/http2sms/errors.rb

Overview

Raised when the sender does not exist (API status 241)

Examples:

raise SenderNotFoundError.new("Sender 'MyApp' not found")

Instance Attribute Summary collapse

Attributes inherited from Error

#raw_response, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(message = "Sender not found", sender: nil, **options) ⇒ SenderNotFoundError

Returns a new instance of SenderNotFoundError.



128
129
130
131
# File 'lib/ovh/http2sms/errors.rb', line 128

def initialize(message = "Sender not found", sender: nil, **options)
  @sender = sender
  super(message, **options.merge(status_code: 241))
end

Instance Attribute Details

#senderString? (readonly)

Returns The sender that was not found.

Returns:

  • (String, nil)

    The sender that was not found



126
127
128
# File 'lib/ovh/http2sms/errors.rb', line 126

def sender
  @sender
end