Exception: Fluence::Gateway::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/fluence/gateway/errors.rb

Overview

Base error class for all gateway client errors.

Rescue this to catch any error surfaced by the gem, regardless of whether it originates from OAuth2 authentication or from the HTTP transport layer.

Examples:

Catch any gateway error

begin
  Fluence::Gateway::Client.get('/api/v1/me', service: :base_valeur)
rescue Fluence::Gateway::Error => e
  logger.warn("gateway call failed: #{e.message}")
end

Direct Known Subclasses

AuthenticationError, ConnectionError