Exception: Fluence::Gateway::ConnectionError

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

Overview

Raised when the gateway or the OAuth2 token endpoint is unreachable — connection refused, DNS failure, or timeout.

Wraps the original Faraday::ConnectionFailed or Faraday::TimeoutError message. Safe to retry with backoff.

Examples:

Retry with backoff on transient failures

begin
  Fluence::Gateway::Client.get('/api/v1/me', service: :base_valeur)
rescue Fluence::Gateway::ConnectionError
  sleep 1
  retry
end