Exception: AMQP::PossibleAuthenticationFailureError
- Defined in:
- lib/amqp/exceptions.rb
Overview
Raised when authentication fails.
Instance Attribute Summary collapse
-
#settings ⇒ Hash
readonly
Connection settings that were used.
Attributes inherited from Error
Instance Method Summary collapse
-
#filtered_settings ⇒ Object
initialize(settings).
-
#initialize(settings) ⇒ PossibleAuthenticationFailureError
constructor
A new instance of PossibleAuthenticationFailureError.
Constructor Details
#initialize(settings) ⇒ PossibleAuthenticationFailureError
Returns a new instance of PossibleAuthenticationFailureError.
43 44 45 46 47 |
# File 'lib/amqp/exceptions.rb', line 43 def initialize(settings) @settings = settings super("AMQP broker closed TCP connection before authentication succeeded: this usually means authentication failure due to misconfiguration. Settings are #{filtered_settings.inspect}") end |
Instance Attribute Details
#settings ⇒ Hash (readonly)
Returns connection settings that were used.
41 42 43 |
# File 'lib/amqp/exceptions.rb', line 41 def settings @settings end |
Instance Method Details
#filtered_settings ⇒ Object
initialize(settings)
49 50 51 52 53 54 55 56 |
# File 'lib/amqp/exceptions.rb', line 49 def filtered_settings filtered_settings = settings.dup [:pass, :password].each do |sensitve_setting| filtered_settings[sensitve_setting] &&= '[filtered]' end filtered_settings end |