Exception: Moonrope::Errors::RequestError
- Defined in:
- lib/moonrope/errors.rb
Direct Known Subclasses
AccessDenied, NotFound, ParameterError, StructuredError, ValidationError
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(options) ⇒ RequestError
constructor
A new instance of RequestError.
- #status ⇒ Object
Constructor Details
#initialize(options) ⇒ RequestError
15 16 17 |
# File 'lib/moonrope/errors.rb', line 15 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
13 14 15 |
# File 'lib/moonrope/errors.rb', line 13 def @options end |
Instance Method Details
#data ⇒ Object
23 24 25 |
# File 'lib/moonrope/errors.rb', line 23 def data {:message => @options} end |
#status ⇒ Object
19 20 21 |
# File 'lib/moonrope/errors.rb', line 19 def status @options.is_a?(Hash) ? @options[:status] || 'error' : 'error' end |