Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error message when download fails #3343

Merged
merged 1 commit into from
Dec 1, 2021

Conversation

lhoestq
Copy link
Member

@lhoestq lhoestq commented Nov 30, 2021

From our discussions in #3269 and #3282 it would be nice to have better messages if a download fails.

In particular the error now shows:

  • the error from the HEAD request if there's one
  • otherwise the response code of the HEAD request

I also added an error to tell users to pass use_auth_token when the Hugging Face Hub returns 401 (Unauthorized).

While paying around with this I also fixed a minor issue with the force_download parameter that was not always taken into account

@lhoestq lhoestq changed the title Better error message when downloading Better error message when download fails Nov 30, 2021
@lhoestq lhoestq merged commit 8f08bee into master Dec 1, 2021
@lhoestq lhoestq deleted the better-error-msg-when-downloading branch December 1, 2021 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant