Page MenuHomePhabricator

[frontend][backend] Error messages not behaving as expected
Open, Stalled, Needs TriagePublicBUG REPORT

Description

When isError is false, text indicating such appears on the "My Contributions" and "Latest Activity" tables.

the_error_false.jpg (354×191 px, 15 KB)

When I turn the database off, the Error messages appear as expected, then disappear on page refresh (we're left with empty forms, since the database is still down, but no error messages).

Upon refreshing the page a second time, the error messages will flash for a second and vanish.

The front-end periodically retries the requests, and occasionally the error messages will reappear upon a failure, but there seems to be no pattern to it.

I'm not sure how important it is to get all of this sorted out immediately; in the deployment environment I'd assume that if one piece of the puzzle is down, they'll all be down. At the very least, we should get rid of the extraneous messages that are appearing on the Dashboard.

Event Timeline

I've opened a draft PR to address this issue.

It would help if I actually included the link: https://github.com/wikimedia/toolhunt-ui/pull/54

After more investigation, I realized that a large part of the problem was due to my abysmal error handling on the backend and the glacial pace at which the requests are failing.

I've opened a PR to address this (https://github.com/wikimedia/toolhunt/pull/58), however the db queries still fail incredibly slowly and I'm not sure how to improve that (aside from creating a new db session on each request and setting up pre_ping, which should do what I want, if I'm understanding the documentation correctly, but also feels like overkill)

At least now the error messages are consistently appearing when the responses finally come in. (This takes a long time, in some cases.)

On the frontend side, I've dealt with the text strings and improved the various console.log messages.

NicoleLBee renamed this task from [frontend] Error messages not behaving as expected to [frontend][backend] Error messages not behaving as expected.Mar 30 2023, 3:46 AM
NicoleLBee changed the task status from Open to In Progress.Apr 6 2023, 9:57 AM
NicoleLBee claimed this task.

Waiting on approval of the backend PR. https://github.com/wikimedia/toolhunt/pull/58

NicoleLBee changed the task status from In Progress to Stalled.May 20 2023, 5:45 PM
NicoleLBee moved this task from In review to Blocked/Paused on the Toolhunt board.

A lot has changed since I opened this PR; need to review and rebase.