Exception: PlanMyStuff::APIError

Inherits:
Error
  • Object
show all
Defined in:
lib/plan_my_stuff/errors.rb

Overview

Raised when GitHub REST API returns a non-success HTTP status

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, status: nil) ⇒ APIError

Returns a new instance of APIError.

Parameters:

  • message (String) (defaults to: nil)
  • status (Integer) (defaults to: nil)


16
17
18
19
# File 'lib/plan_my_stuff/errors.rb', line 16

def initialize(message = nil, status: nil)
  @status = status
  super(message)
end

Instance Attribute Details

#statusInteger (readonly)

Returns:

  • (Integer)


11
12
13
# File 'lib/plan_my_stuff/errors.rb', line 11

def status
  @status
end