Exception: JSONAPI::Exceptions::UserDefinedExceptions::InvalidComponent

Inherits:
StandardError
  • Object
show all
Defined in:
lib/easy/jsonapi/exceptions/user_defined_exceptions.rb

Overview

Invaliid Document Error when checking user defined restrictions

Direct Known Subclasses

InvalidDocument, InvalidHeader, InvalidQueryParam

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(err) ⇒ InvalidComponent

Returns a new instance of InvalidComponent.



16
17
18
19
20
# File 'lib/easy/jsonapi/exceptions/user_defined_exceptions.rb', line 16

def initialize(err)
  @msg = err[0]
  @status_code = err[1] || 400
  super
end

Instance Attribute Details

#msgObject

Returns the value of attribute msg.



14
15
16
# File 'lib/easy/jsonapi/exceptions/user_defined_exceptions.rb', line 14

def msg
  @msg
end

#status_codeObject

Returns the value of attribute status_code.



14
15
16
# File 'lib/easy/jsonapi/exceptions/user_defined_exceptions.rb', line 14

def status_code
  @status_code
end