Exception: Episodic::Platform::InvalidParameters
- Inherits:
-
ResponseError
- Object
- StandardError
- EpisodicPlatformException
- ResponseError
- Episodic::Platform::InvalidParameters
- Defined in:
- lib/episodic/platform/exceptions.rb
Overview
The value specified for a parameter is not valid.
Instance Attribute Summary
Attributes inherited from ResponseError
Instance Method Summary collapse
-
#initialize(message, response, invalid_parameters) ⇒ InvalidParameters
constructor
Constructor.
Constructor Details
#initialize(message, response, invalid_parameters) ⇒ InvalidParameters
Constructor. Override to include inforation about the invalid parameter(s).
Parameters
- message<String>
-
The message to include in the exception
- response<Episodic::Platform::HTTPResponse>
-
The response object.
- invalid_parameters<Object>
-
This is either a Hash or an Array of hashes if there is more than one invalid parameter.
90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/episodic/platform/exceptions.rb', line 90 def initialize(, response, invalid_parameters) if (invalid_parameters) invalid_parameters["invalid_parameter"] = [invalid_parameters["invalid_parameter"]] if invalid_parameters["invalid_parameter"].is_a?(Hash) # Append to the message invalid_parameters["invalid_parameter"].each do |ip| << "\n#{ip['name']}: #{ip['content']}" end end super(, response) end |