Exception: Wajub::WajubError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/wajub/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code:, http_status:, errors: nil, raw: nil) ⇒ WajubError

Returns a new instance of WajubError.



7
8
9
10
11
12
13
# File 'lib/wajub/errors.rb', line 7

def initialize(message, code:, http_status:, errors: nil, raw: nil)
  super(message)
  @code = code
  @http_status = http_status
  @errors = errors
  @raw = raw
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/wajub/errors.rb', line 5

def code
  @code
end

#errorsObject (readonly)

Returns the value of attribute errors.



5
6
7
# File 'lib/wajub/errors.rb', line 5

def errors
  @errors
end

#http_statusObject (readonly)

Returns the value of attribute http_status.



5
6
7
# File 'lib/wajub/errors.rb', line 5

def http_status
  @http_status
end

#rawObject (readonly)

Returns the value of attribute raw.



5
6
7
# File 'lib/wajub/errors.rb', line 5

def raw
  @raw
end