Exception: DurableHuggingfaceHub::LocalTokenNotFoundError

Inherits:
DurableHuggingfaceHubError show all
Defined in:
lib/durable_huggingface_hub/errors.rb

Overview

Error raised when no local authentication token is found.

This error occurs when an operation requires authentication but no token is available in environment variables or the token file.

Examples:

raise LocalTokenNotFoundError.new

Instance Method Summary collapse

Constructor Details

#initialize(message: nil) ⇒ LocalTokenNotFoundError

Creates a new local token not found error.

Parameters:

  • message (String, nil) (defaults to: nil)

    Custom error message



259
260
261
262
263
# File 'lib/durable_huggingface_hub/errors.rb', line 259

def initialize(message: nil)
  message ||= "No HuggingFace token found. " \
              "Please login using DurableHuggingfaceHub.login or set the HF_TOKEN environment variable."
  super(message)
end