Exception: Discorb::HTTPError

Inherits:
DiscorbError show all
Defined in:
lib/discorb/error.rb

Overview

Represents a HTTP error.

Direct Known Subclasses

BadRequestError, ForbiddenError, NotFoundError

Instance Attribute Summary collapse

Instance Attribute Details

#code -> String (readonly)

Returns the HTTP response code.

Returns:

  • (String)

    the HTTP response code.



38
39
40
# File 'lib/discorb/error.rb', line 38

def code
  @code
end

#response -> Net::HTTPResponse (readonly)

Returns the HTTP response.

Returns:

  • (Net::HTTPResponse)

    the HTTP response.



40
41
42
# File 'lib/discorb/error.rb', line 40

def response
  @response
end