Exception: Fizzy::AuthError

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

Overview

Raised when authentication fails (401).

Instance Attribute Summary

Attributes inherited from Error

#cause, #code, #hint, #http_status, #request_id, #retry_after, #retryable

Instance Method Summary collapse

Methods inherited from Error

#exit_code, exit_code_for, #retryable?

Constructor Details

#initialize(message = "Authentication required", hint: nil, cause: nil) ⇒ AuthError

Returns a new instance of AuthError.



138
139
140
141
142
143
144
145
146
# File 'lib/fizzy/errors.rb', line 138

def initialize(message = "Authentication required", hint: nil, cause: nil)
  super(
    code: ErrorCode::AUTH,
    message: message,
    hint: hint || "Check your access token or session cookie",
    http_status: 401,
    cause: cause
  )
end