fix: handle unknown user error
Description
Looking up an invalid Perun user ID on the Heuristics page resulted in an error that crashed the page. This change catches the error and presents an error message to the user who can attempt a new lookup on the same page.
How to test
- deploy the changes from this commit to id-test
- redirect id.muni.cz to the id-test IP address in
/etc/hosts
(add this line to/etc/hosts
: 147.251.18.44 id.muni.cz) - go to: https://id.muni.cz/proxygui/heuristics
- look up a non-existent user ID, for example
123123123123
- an error message should appear warning the user of failing search result
- look up a valid user ID, for example
1
or123
, the search should lead to the user's heuristics
Author's checklist
-
I have followed the contribution guidelines -
This MR has been tested or does not change functionality -
I have added relevant merge request dependencies (if this MR has any) -
I have added the correct labels -
I have assigned reviewers (if any are relevant) -
I have edited the documentation (if the changes require it) or I have noted the need for the change if I do not have access to the documentation -
I have marked all introduced BREAKING CHANGES or necessary DEPLOYMENT NOTES in the commit message(s)
Reviewer's checklist
-
This MR has been tested or does not change functionality -
This MR has correct commit message format
Other information
I have also noticed that the translations haven't been updated in a long time and many of them are missing. I considered it outside of the scope of this task, but we should probably dedicate a separate low-ish priority task to fixing this issue.
Related issues
closes STR-1376
Edited by Jan Pavlíček