Skip to content

Commit

Permalink
Fix error message on permission issue (#2465)
Browse files Browse the repository at this point in the history
* Fix error message on permission issue

* update
  • Loading branch information
Wauplin authored Aug 20, 2024
1 parent 0231357 commit b3d2240
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/huggingface_hub/utils/_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def hf_raise_for_status(response: Response, endpoint_name: Optional[str] = None)
f"\n\n{response.status_code} Forbidden: {error_message}."
+ f"\nCannot access content at: {response.url}."
+ "\nIf you are trying to create or update content, "
+ "make sure you have a token with the `write` role."
+ "make sure your token has the correct permissions."
)
raise HfHubHTTPError(message, response=response) from e

Expand Down

0 comments on commit b3d2240

Please sign in to comment.