Exception: DurableHuggingfaceHub::GatedRepoError
- Inherits:
-
HfHubHTTPError
- Object
- StandardError
- DurableHuggingfaceHubError
- HfHubHTTPError
- DurableHuggingfaceHub::GatedRepoError
- Defined in:
- lib/durable_huggingface_hub/errors.rb
Overview
Error raised when attempting to access a gated repository without proper access.
Gated repositories require users to accept terms or have special permissions.
Instance Attribute Summary collapse
-
#repo_id ⇒ String
readonly
The gated repository ID.
Attributes inherited from HfHubHTTPError
#request_id, #response_body, #server_message, #status_code
Instance Method Summary collapse
-
#initialize(repo_id, message: nil) ⇒ GatedRepoError
constructor
Creates a new gated repository error.
Constructor Details
#initialize(repo_id, message: nil) ⇒ GatedRepoError
Creates a new gated repository error.
204 205 206 207 208 |
# File 'lib/durable_huggingface_hub/errors.rb', line 204 def initialize(repo_id, message: nil) @repo_id = repo_id ||= "Repository '#{repo_id}' is gated. You must be authenticated and have access." super(, status_code: 403) end |
Instance Attribute Details
#repo_id ⇒ String (readonly)
Returns The gated repository ID.
198 199 200 |
# File 'lib/durable_huggingface_hub/errors.rb', line 198 def repo_id @repo_id end |