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

fix frontend error handing of patient list ajax error #4413

Merged
merged 3 commits into from
Oct 22, 2024

Conversation

achen2401
Copy link
Contributor

part of https://movember.atlassian.net/browse/TN-3324

Currently UI is a blank screen when the ajax call to retrieve patient list data encounters error:
Screenshot 2024-10-22 at 11 08 58 AM

Added fix to error handling with error displaying on screen and allowing user to change/clear filters on the UI if need to
Screenshot 2024-10-22 at 11 13 29 AM

ivan-c and others added 3 commits October 10, 2024 10:44
Address a stream of 400 errors (CSRF token is missing) related to saving
patientlist table preferences.
Cause:
I think the error stemmed from when an ajax request was first made to
retrieve patient data, which is precedes by a call to save table
preferences, the document DOM was not ready (which includes the value of
CSRF token in an hidden element) - hence the missing CSRF token error.
Fix:
To add check for DOM readiness before the request to save table
preferences is made.

---------

Co-authored-by: Amy Chen <clone@cesium.cirg.washington.edu>
@mcjustin
Copy link
Member

part of https://movember.atlassian.net/browse/TN-3324

Currently UI is a blank screen when the ajax call to retrieve patient list data encounters error...
Added fix to error handling with error displaying on screen and allowing user to change/clear filters on the UI if need to ...

Thanks @achen2401 . In your screenshot, it looks like the user wouldn't be able to clear the birthdate filter, which was the one causing the problem at https://movember.atlassian.net/browse/TN-3324 . I think this change would still be an improvement if that's the case, but I just want to clarify.

@achen2401
Copy link
Contributor Author

achen2401 commented Oct 22, 2024

In your screenshot, it looks like the user wouldn't be able to clear the birthdate filter, which was the one causing the problem at https://movember.atlassian.net/browse/TN-3324 . I think this change would still be an improvement if that's the case, but I just want to clarify.

@pbugni right, the user won't be able to clear the birthdate filter, but can see that error has occurred. This is an improvement, as the user can then try to clear other filter(s) (in the case of the screenshot, the study ID field), then the patient list data will be returned since the filters have been modified.

@achen2401 achen2401 changed the base branch from develop to master October 22, 2024 18:49
@achen2401 achen2401 merged commit 461afea into master Oct 22, 2024
2 checks passed
@achen2401 achen2401 deleted the bugfix/patient-list-error-handling branch October 22, 2024 20:54
achen2401 pushed a commit that referenced this pull request Oct 22, 2024
@achen2401 achen2401 restored the bugfix/patient-list-error-handling branch October 22, 2024 20:59
achen2401 added a commit that referenced this pull request Oct 22, 2024
accidentally merged
[this](#4413) into Master,
reverted that. Will merge this into the `develop` branch.

Co-authored-by: Amy Chen <clone@cesium.cirg.washington.edu>
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.

4 participants