Exception: Basecamp::AuthError

Inherits:
Error
  • Object
show all
Defined in:
lib/basecamp/auth_error.rb

Overview

Raised when authentication fails (401).

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of AuthError.



6
7
8
9
10
11
12
13
14
# File 'lib/basecamp/auth_error.rb', line 6

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