Exception: DurableHuggingfaceHub::RevisionNotFoundError
- Inherits:
-
HfHubHTTPError
- Object
- StandardError
- DurableHuggingfaceHubError
- HfHubHTTPError
- DurableHuggingfaceHub::RevisionNotFoundError
- Defined in:
- lib/durable_huggingface_hub/errors.rb
Overview
Error raised when a specific revision is not found in a repository.
Instance Attribute Summary collapse
-
#repo_id ⇒ String
readonly
The repository ID.
-
#revision ⇒ String
readonly
The revision that was not found.
Attributes inherited from HfHubHTTPError
#request_id, #response_body, #server_message, #status_code
Instance Method Summary collapse
-
#initialize(revision, repo_id: nil, message: nil) ⇒ RevisionNotFoundError
constructor
Creates a new revision not found error.
Constructor Details
#initialize(revision, repo_id: nil, message: nil) ⇒ RevisionNotFoundError
Creates a new revision not found error.
121 122 123 124 125 126 |
# File 'lib/durable_huggingface_hub/errors.rb', line 121 def initialize(revision, repo_id: nil, message: nil) @revision = revision @repo_id = repo_id ||= super(, status_code: 404) end |
Instance Attribute Details
#repo_id ⇒ String (readonly)
Returns The repository ID.
114 115 116 |
# File 'lib/durable_huggingface_hub/errors.rb', line 114 def repo_id @repo_id end |
#revision ⇒ String (readonly)
Returns The revision that was not found.
111 112 113 |
# File 'lib/durable_huggingface_hub/errors.rb', line 111 def revision @revision end |