Exception: Asimov::MissingRequiredParameterError

Inherits:
RequestError show all
Defined in:
lib/asimov/error.rb

Overview

Error raised when a required parameter is not included in the request.

Instance Method Summary collapse

Constructor Details

#initialize(parameter_name) ⇒ MissingRequiredParameterError

Returns a new instance of MissingRequiredParameterError.



168
169
170
171
# File 'lib/asimov/error.rb', line 168

def initialize(parameter_name)
  super()
  @parameter_name = parameter_name
end

Instance Method Details

#messageObject

Returns the error message based on the missing parameter name.



176
177
178
# File 'lib/asimov/error.rb', line 176

def message
  "The parameter #{@parameter_name} is required."
end