Exception: DurableHuggingfaceHub::EntryNotFoundError
- Inherits:
-
HfHubHTTPError
- Object
- StandardError
- DurableHuggingfaceHubError
- HfHubHTTPError
- DurableHuggingfaceHub::EntryNotFoundError
- Defined in:
- lib/durable_huggingface_hub/errors.rb
Overview
Error raised when a specific file or entry is not found in a repository.
Instance Attribute Summary collapse
-
#path ⇒ String
readonly
The file path that was not found.
-
#repo_id ⇒ String?
readonly
The repository ID.
Attributes inherited from HfHubHTTPError
#request_id, #response_body, #server_message, #status_code
Instance Method Summary collapse
-
#initialize(path, repo_id: nil, revision: nil, message: nil) ⇒ EntryNotFoundError
constructor
Creates a new entry not found error.
Constructor Details
#initialize(path, repo_id: nil, revision: nil, message: nil) ⇒ EntryNotFoundError
Creates a new entry not found error.
156 157 158 159 160 161 162 |
# File 'lib/durable_huggingface_hub/errors.rb', line 156 def initialize(path, repo_id: nil, revision: nil, message: nil) @path = path @repo_id = repo_id @revision = revision ||= super(, status_code: 404) end |
Instance Attribute Details
#path ⇒ String (readonly)
Returns The file path that was not found.
145 146 147 |
# File 'lib/durable_huggingface_hub/errors.rb', line 145 def path @path end |
#repo_id ⇒ String? (readonly)
Returns The repository ID.
148 149 150 |
# File 'lib/durable_huggingface_hub/errors.rb', line 148 def repo_id @repo_id end |