Exception: Nimbu::Error::InvalidOptions

Inherits:
ClientError show all
Defined in:
lib/nimbu-api/errors/invalid_options.rb

Instance Attribute Summary

Attributes inherited from ClientError

#problem, #resolution, #summary

Attributes inherited from NimbuError

#response_headers, #response_message

Instance Method Summary collapse

Methods inherited from ClientError

#generate_message

Methods inherited from NimbuError

#backtrace

Methods included from Utils::Descendants

#descendants

Constructor Details

#initialize(invalid, valid) ⇒ InvalidOptions

Returns a new instance of InvalidOptions.



7
8
9
10
11
12
13
14
15
# File 'lib/nimbu-api/errors/invalid_options.rb', line 7

def initialize(invalid, valid)
  super(
    generate_message(
      :problem => "Invalid option #{invalid.keys.join(', ')} provided for this request.",
      :summary => "Nimbu gem checks the request parameters passed to ensure that Nimbu api is not hit unnecessairly and to fail fast.",
      :resolution => "Valid options are: #{valid.join(', ')}, make sure these are the ones you are using"
    )
  )
end