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

Improve error clarity when a certain file is too large #1010

Open
rauchg opened this issue Nov 26, 2017 · 10 comments
Open

Improve error clarity when a certain file is too large #1010

rauchg opened this issue Nov 26, 2017 · 10 comments
Labels
triaged: bug Issue or PR has been reviewed by a maintainer and work is being tracked

Comments

@rauchg
Copy link
Member

rauchg commented Nov 26, 2017

#992 (comment)

@rauchg rauchg added triaged: bug Issue or PR has been reviewed by a maintainer and work is being tracked good first contribution labels Nov 26, 2017
@williamolojede
Copy link

This issue has been open up for a while, I'll like to take a shot at it😀

@williamolojede
Copy link

@rauchg you said in #992 that the error message will be improved, what will be a good/appropriate error message?

@rauchg
Copy link
Member Author

rauchg commented Jan 10, 2018

Error! The file "x" exceeds your plan's limit ymb

Let me know if you have enough information in the error object to render the limit. Otherwise, I can make sure we give you something like this:

{
   "error": {
      "code": "max_filesize_exceeded",
      "max": 1235931851
   }
}

By using the bytes module we can also render it in a human readable-way.

Thanks a lot @williamolojede

@williamolojede
Copy link

@rauchg Thanks for you previous response and I apologize for the late response. I tried recreating the issue by deploying a node app with an mp3(> 3mb) file included since that exceeds the single file limit for OSS plan but i don't seem to get any error and the upload and deployment is successful. Adding a bigger file(>10mb) doesn't seem to cause any issue too and it syncs the new file successfully, Now I'm confused, I'm i missing something?

Also is it possible to use my copy of the now-cli repo to run now commands so I see my proposed fix in action?

@timneutkens
Copy link
Member

@williamolojede

Also is it possible to use my copy of the now-cli repo to run now commands so I see my proposed fix in action?

To link the now command to your local clone:
npm run link

To build the files as you make changes:
npm run dev

@williamolojede
Copy link

@timneutkens thanks man,

I tried recreating the issue by deploying a node app with an mp3(> 3mb) file included since that exceeds the single file limit for OSS plan but i don't seem to get any error and the upload and deployment is successful. Adding a bigger file(>10mb) doesn't seem to cause any issue too and it syncs the new file successfully, Now I'm confused, I'm i missing something?

do you have an idea of what is going on with that?

@williamolojede
Copy link

@rauchg I'm hoping to get a response from you soon

@Aneeshmysore
Copy link

@rauchg @williamolojede is this an issue that is still open to be worked on?

@OlliV
Copy link
Contributor

OlliV commented Mar 7, 2018

There are two possibilities, either the file was already uploaded before or there was an issue on our server side.

Here is how the error object is formatted:

{
  error: {
    message,
    code: 'size_limit_exceeded',
    sizeLimit
  }
}

@leo
Copy link
Contributor

leo commented Nov 13, 2018

We should render a better error here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged: bug Issue or PR has been reviewed by a maintainer and work is being tracked
Projects
None yet
Development

No branches or pull requests

7 participants