Exception: Vibe::Error::RequiredParams

Inherits:
ClientError show all
Defined in:
lib/vibe/error/required_params.rb

Instance Attribute Summary

Attributes inherited from ClientError

#problem, #resolution, #summary

Attributes inherited from VibeError

#response_headers, #response_message

Instance Method Summary collapse

Methods inherited from ClientError

#generate_message

Constructor Details

#initialize(provided, required) ⇒ RequiredParams

Returns a new instance of RequiredParams.



5
6
7
8
9
10
11
12
13
# File 'lib/vibe/error/required_params.rb', line 5

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