Exception: Leash::AuthError

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

Overview

Raised by ‘Leash::Auth.get_user` when the leash-auth cookie is missing / invalid. `Leash#auth.user` returns `nil` instead so it never raises.

Instance Attribute Summary

Attributes inherited from Error

#action, #cause, #code, #see_also, #status

Instance Method Summary collapse

Methods inherited from Error

#connect_url, #message, #to_s

Constructor Details

#initialize(message = "Authentication failed", **opts) ⇒ AuthError

Returns a new instance of AuthError.



121
122
123
124
# File 'lib/leash/errors.rb', line 121

def initialize(message = "Authentication failed", **opts)
  opts[:code] ||= "NO_AUTH_CONTEXT"
  super(message, **opts)
end