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

File size limit error message should include size of the limit #2486

Closed
di opened this issue Oct 9, 2017 · 4 comments
Closed

File size limit error message should include size of the limit #2486

di opened this issue Oct 9, 2017 · 4 comments
Labels
good first issue This issue is ideal for first-time contributors!

Comments

@di
Copy link
Member

di commented Oct 9, 2017

Since we don't document the file size limit for uploads anywhere, it'd be nice if the error message when an upload is over the limit includes what the limit is, especially considering that the limits might be different for various projects.

Currently the message is something like:

HTTPError: 400 Client Error: File too large. for url: https://upload.pypi.org/legacy/

It'd be nice if this was something like:

HTTPError: 400 Client Error: File too large (limit for <project_name> is <limit>) for url: https://upload.pypi.org/legacy/
@di di added the good first issue This issue is ideal for first-time contributors! label Oct 9, 2017
Miserlou pushed a commit to Miserlou/warehouse that referenced this issue Oct 9, 2017
@brainwane brainwane added this to the 3: Publicize beta milestone Dec 7, 2017
@brainwane
Copy link
Contributor

In our meeting today we decided this belongs in the first milestone, the MVP for package maintainers.

@Miserlou is working on implementing it in #2487.

@di
Copy link
Member Author

di commented Dec 26, 2017

I closed #2487, so this issue is still open and available for someone else to pick up as their first contribution.

@pradyunsg
Copy link
Contributor

@di

https://github.com/pypa/warehouse/blob/d12b7c1ff792942b6ba8c91793e4fa6e1f1cf137/warehouse/forklift/legacy.py#L878

It's just the matter of formatting the project name and file size limit from local variables here into the message; correct?

@di
Copy link
Member Author

di commented Dec 27, 2017

@pradyunsg Yep! Something like:

File is too large. Limit for project 'foobar' is 60MB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue This issue is ideal for first-time contributors!
Projects
None yet
Development

No branches or pull requests

3 participants