diff --git a/src/huggingface_hub/hf_api.py b/src/huggingface_hub/hf_api.py index 76b35d841c..6b1c947c8e 100644 --- a/src/huggingface_hub/hf_api.py +++ b/src/huggingface_hub/hf_api.py @@ -3242,7 +3242,7 @@ def create_repo( return RepoUrl(f"{self.endpoint}/{repo_id}") return RepoUrl(f"{self.endpoint}/{repo_type}/{repo_id}") except HfHubHTTPError: - raise + raise err else: raise