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 messages in Uploader #146

Closed
twinkietoes-on opened this issue Nov 19, 2022 · 4 comments
Closed

Better error messages in Uploader #146

twinkietoes-on opened this issue Nov 19, 2022 · 4 comments

Comments

@twinkietoes-on
Copy link
Collaborator

Especially on login session timeouts, when someone has left the page open too long before uploading.

At the conclusion of the upload, they get a head-scratcher. I think the error message given is:
SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON
which means nothing to an average user. It would be great if we could somehow parse out the error and display meaningful messages.

@notartom
Copy link
Member

Is this an existing thing, or has appeared with the Ubuntu Jammy upgrade testing?

@twinkietoes-on
Copy link
Collaborator Author

Existed for quite a while. Sorry for the bad timing on reporting it!

@hamidsafdari
Copy link
Contributor

#175 should fix this. I added a couple of checks to see if the request was sent through AJAX and if yes, send a JSON response. Also added a check to see if the user is logged in (only after checking for groups). It looks like in production, if the user is not logged in, he cannot see the uploader page.

146-uploader-session-timeout.webm

notartom pushed a commit that referenced this issue Dec 10, 2023
@notartom
Copy link
Member

Closed with 1c0a921

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants