Exception: Ovh::Http2sms::InvalidParameterError

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

Overview

Raised when a parameter value is invalid (API status 202)

Examples:

raise InvalidParameterError.new("Invalid tag: is too long", parameter: "tag")

Instance Attribute Summary collapse

Attributes inherited from Error

#raw_response, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(message = "Invalid parameter", parameter: nil, **options) ⇒ InvalidParameterError

Returns a new instance of InvalidParameterError.



58
59
60
61
# File 'lib/ovh/http2sms/errors.rb', line 58

def initialize(message = "Invalid parameter", parameter: nil, **options)
  @parameter = parameter
  super(message, **options.merge(status_code: 202))
end

Instance Attribute Details

#parameterString? (readonly)

Returns Name of the invalid parameter.

Returns:

  • (String, nil)

    Name of the invalid parameter



56
57
58
# File 'lib/ovh/http2sms/errors.rb', line 56

def parameter
  @parameter
end