Exception: Twitch::Error::ResponseError

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

Overview

An error that occurred as the result of a request to the Twitch.tv API.

Direct Known Subclasses

ClientError, FormatError, ServerError

Instance Attribute Summary collapse

Instance Attribute Details

#bodyString (readonly)

Returns The response body.

Examples:

'{"status":422,"message":"Channel desrow is not available on Twitch","error":"Unprocessable Entity"}'


27
28
29
# File 'lib/kappa/errors.rb', line 27

def body
  @body
end

#statusFixnum (readonly)

Returns The HTTP status code for the response.

Examples:

500


22
23
24
# File 'lib/kappa/errors.rb', line 22

def status
  @status
end

#urlString (readonly)

Returns The request URL that resulted in this response error.

Examples:

"https://api.twitch.tv/kraken/streams?limit=100&offset=0"


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

def url
  @url
end