Exception: DurableHuggingfaceHub::LFSError

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

Overview

Error raised when LFS (Large File Storage) operations fail.

Examples:

raise LFSError.new("Upload failed", file: "large_model.bin")

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, file: nil) ⇒ LFSError

Creates a new LFS error.

Parameters:

  • message (String)

    Error message

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

    File path



406
407
408
409
410
# File 'lib/durable_huggingface_hub/errors.rb', line 406

def initialize(message, file: nil)
  @file = file
  error_msg = file ? "LFS error for '#{file}': #{message}" : "LFS error: #{message}"
  super(error_msg)
end

Instance Attribute Details

#fileString? (readonly)

Returns The file involved in the LFS operation.

Returns:

  • (String, nil)

    The file involved in the LFS operation



400
401
402
# File 'lib/durable_huggingface_hub/errors.rb', line 400

def file
  @file
end