Exception: KubeMQ::AuthenticationError

Inherits:
ConnectionError show all
Defined in:
lib/kubemq/errors.rb

Overview

Raised when authentication or authorization fails.

Covers invalid, expired, or missing auth tokens (+AUTH_FAILED+) and insufficient permissions (+PERMISSION_DENIED+). Not retryable — fix credentials before retrying.

Examples:

begin
  client.ping
rescue KubeMQ::AuthenticationError => e
  logger.error("Auth failed: #{e.message}")
end

Instance Attribute Summary

Attributes inherited from Error

#channel, #code, #details, #operation, #request_id, #suggestion

Instance Method Summary collapse

Methods inherited from Error

#cause, #retryable?, #to_s

Constructor Details

#initialize(message, **kwargs) ⇒ AuthenticationError

Returns a new instance of AuthenticationError.



119
120
121
122
# File 'lib/kubemq/errors.rb', line 119

def initialize(message, **kwargs)
  kwargs[:retryable] = false unless kwargs.key?(:retryable)
  super
end