Page MenuHomePhabricator

Wikisource Export: Error message follow-up - HIGH PRIORITY
Closed, ResolvedPublic

Assigned To
Authored By
ifried
Mar 22 2021, 10:06 PM
Referenced Files
F34197657: timeout_errors.png
Mar 30 2021, 1:58 PM
F34197654: 404_errors.png
Mar 30 2021, 1:58 PM
F34197664: 500_errors.png
Mar 30 2021, 1:58 PM
F34197659: invalid_format_errors.png
Mar 30 2021, 1:58 PM
F34181087: 500_error.png
Mar 23 2021, 9:24 AM

Description

NOTE: This is high-priority. Work on ASAP. Thanks!

This ticket is a follow-up to T277237.

Acceptance Criteria:

  • For 500 errors, display the following message at the top of the Wiksource Export page according to the general UI specifications found in T277237:

An error occurred. *Learn more*

Your download failed due to a server error. Please try these steps:

  1. Try to download the book again.
  2. Try to download the book as an EPUB file.
  3. Check the box in "Options" to remove credits.
  4. Check the box in "Options" to remove images.

If the error persists, please report an issue on Phabricator.

  • For 404 errors, do not display the error message with proposed next steps, as this would not be helpful for such cases

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptMar 22 2021, 10:06 PM
ifried renamed this task from Wikisource Export: Error message follow-up to Wikisource Export: Error message follow-up - HIGH PRIORITY.Mar 22 2021, 10:08 PM

"If the error persists, please report an issue on Phabricator." links to the Phab frontpage. That would be unhelpful; it's like "See the wiki!" without a link or context.

Please provide a direct link (such as https://phabricator.wikimedia.org/maniphest/task/edit/?projects=WS_Export) and please also link to https://www.mediawiki.org/wiki/Phabricator/Help for folks who have never heard of or used that "Phabricator" thingy and might feel intimidated. Thanks a lot. :)

@ifried Should we also display the full exception that occurred? This probably won't be any use to the user, but if they do file a ticket and include the error message that can help us debug the issue. Some of the exceptions are pretty long and ugly though.

500_error.png (825ร—1 px, 284 KB)

Of course, we already receive an email whenever these errors occur, so I suppose if we need the full error we can look in our emails.

@dom_walden Thanks for asking about this. Yeah, that message is pretty ugly. If we kept it, I worry it may create a more negative experience, since it appears a bit overwhelming. I'm inclined to think we should hide that information and just provide it to engineers in the emails, rather than exposing it to the user. But I am curious to hear other opinions. Pinging @nayoub to see what he thinks. Thanks!

Should we also display the full exception that occurred?

That giant ugly error message will be hidden, yes. There's actually no way around that with the way things are set up currently (unless you want to stay with the status quo).

Draft PR at https://github.com/wikimedia/ws-export/pull/352 that may need more discussion. What I've done is only capture errors from ebook-convert and certain MySQL errors. This should account for almost all errors we see. Right now the way it works is you either get a pretty error message with the "Learn more" tips and no email, or you get an ugly error message and an email. With the new PR, the types of errors we're capturing are not indicative of bugs (things we can fix) but rather some intermittent issue that can be solved by re-trying / disabling credits / etc., so I think it's okay that we're suppressing the emails. It is still possible for some other 500-level error to occur, and you will get an ugly error, but in those cases we do want emails, and saying "Try again" may not be good advice.

Hopefully that makes sense. I did also hide the "Learn more" link for 404 errors.

Please provide a direct link (such as https://phabricator.wikimedia.org/maniphest/task/edit/?projects=WS_Export)

That is what we're using, actually https://github.com/wikimedia/ws-export/blob/ead45e83f6f942e17b6ed34a3510e5867ed65835/templates/bundles/TwigBundle/Exception/error.html.twig#L23

We now see the Please try these steps... error when the export times out.

We no longer see it when the book is invalid (404 error).

I think everything else is the same.

Timeout error (without an email):

timeout_errors.png (679ร—852 px, 63 KB)

404/invalid book error:

404_errors.png (527ร—870 px, 41 KB)

Invalid format error:

invalid_format_errors.png (500ร—1 px, 56 KB)

500 error (with an email):

500_errors.png (350ร—818 px, 33 KB)

Test environment: https://ws-export-test.wmcloud.org version 2.5.0-7-g5ba7d68.

This has been released to production. I'm marking it as Done.