Exception: Hook0::Generated::ProblemError

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

Overview

A failure the API answered with, whether or not it could be read as a problem.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, problem, detail) ⇒ ProblemError

Returns a new instance of ProblemError.

Parameters:

  • status (Integer)

    what the API answered under

  • problem (Problem, nil)

    the document it answered, when this client could read one

  • detail (String)

    what to say about the failure



18
19
20
21
22
# File 'lib/hook0/generated/errors.rb', line 18

def initialize(status, problem, detail)
  super(detail)
  @status = status
  @problem = problem
end

Instance Attribute Details

#problemObject (readonly)

Returns the value of attribute problem.



13
14
15
# File 'lib/hook0/generated/errors.rb', line 13

def problem
  @problem
end

#statusObject (readonly)

Returns the value of attribute status.



13
14
15
# File 'lib/hook0/generated/errors.rb', line 13

def status
  @status
end