Exception: ComicVine::CVHTTPError

Inherits:
CVError
  • Object
show all
Defined in:
lib/comic_vine.rb

Overview

Raised when the server answers with a non-2xx HTTP status.

Direct Known Subclasses

CVRateLimitError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status = nil) ⇒ CVHTTPError

Returns a new instance of CVHTTPError.

Parameters:

  • message (String)

    the error message

  • status (Integer, nil) (defaults to: nil)

    the HTTP status code



39
40
41
42
# File 'lib/comic_vine.rb', line 39

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

Instance Attribute Details

#statusInteger? (readonly)

Returns the HTTP status code, if known.

Returns:

  • (Integer, nil)

    the HTTP status code, if known



35
36
37
# File 'lib/comic_vine.rb', line 35

def status
  @status
end