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

feat(website): show a meaningful error if uploaded file is too large #1634

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chaoran-chen
Copy link
Member

@chaoran-chen chaoran-chen commented Apr 20, 2024

resolves #1226
preview URL: https://1226-file-too-big-error.loculus.org

Summary

Screenshot

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by an appropriate test.

This is blocked by #1635 because the web application cannot see the response status due to CORS errors.

@chaoran-chen chaoran-chen added the preview Triggers a deployment to argocd label Apr 20, 2024
@@ -423,6 +423,11 @@ function handleError(onError: (message: string) => void, action: Action) {
case 400:
onError('Failed to submit sequence entries: ' + error.response.data.detail);
return;
case 413:
onError(
'The uploaded file was too large. Please compress the file or split it into smaller submissions.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know where we configure how large is too large? It would be nice to give as specific a response as possible - e.g. "the maximum allowed size is X MB"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been also wondering.. I found a config in the backend which however seems to allow 5 GB. Maybe (for our non-local deployments) there is some web server in Kubernetes that sets a more strict limit by default? Do you understand what we have between the backend and the public internet?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #1635

@chaoran-chen chaoran-chen force-pushed the 1226-file-too-big-error branch from e5cbe92 to 5d200ff Compare April 21, 2024 17:51
@theosanderson
Copy link
Member

As in #1635 (comment) it seems like this likely relates to CloudFlare. (You could see if it happens locally)

@chaoran-chen chaoran-chen force-pushed the 1226-file-too-big-error branch from cdc6de1 to f8ba992 Compare May 5, 2024 17:57
@corneliusroemer corneliusroemer removed the preview Triggers a deployment to argocd label May 9, 2024
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.

Show meaningful error and not "Network error" when uploading too large file
3 participants