Exception: Activite::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/activite/error.rb

Overview

Custom errors for rescuing from Withings API errors

Constant Summary collapse

ClientConfigurationError =

Raised when client is misconfigured

Class.new(self)
InvalidResponseError =

Withings returns 200 for everything, making it difficult to figure out exactly what went wrong. They also appear to send back fairly arbitrary codes, for example a response with an HTTP Status Code 200 can contain a body Params” if OAuth credentials are incorrect (503 normally indicates that a downstream service is unavailable). Because of this we just wrap most errors in this class.

Class.new(self)

Instance Attribute Summary collapse

Instance Attribute Details

#codeInteger (readonly)

Returns:

  • (Integer)

5
6
7
# File 'lib/activite/error.rb', line 5

def code
  @code
end