Exception: DurableHuggingfaceHub::DisabledRepoError
- Inherits:
-
HfHubHTTPError
- Object
- StandardError
- DurableHuggingfaceHubError
- HfHubHTTPError
- DurableHuggingfaceHub::DisabledRepoError
- Defined in:
- lib/durable_huggingface_hub/errors.rb
Overview
Error raised when attempting to access a disabled repository.
Repositories may be disabled due to policy violations or other reasons.
Instance Attribute Summary collapse
-
#repo_id ⇒ String
readonly
The disabled repository ID.
Attributes inherited from HfHubHTTPError
#request_id, #response_body, #server_message, #status_code
Instance Method Summary collapse
-
#initialize(repo_id, message: nil) ⇒ DisabledRepoError
constructor
Creates a new disabled repository error.
Constructor Details
#initialize(repo_id, message: nil) ⇒ DisabledRepoError
Creates a new disabled repository error.
225 226 227 228 229 |
# File 'lib/durable_huggingface_hub/errors.rb', line 225 def initialize(repo_id, message: nil) @repo_id = repo_id ||= "Repository '#{repo_id}' has been disabled." super(, status_code: 403) end |
Instance Attribute Details
#repo_id ⇒ String (readonly)
Returns The disabled repository ID.
219 220 221 |
# File 'lib/durable_huggingface_hub/errors.rb', line 219 def repo_id @repo_id end |