Skip to content

fix: handle unknown user error

Peter Bolha requested to merge xbolha/STR-1376/handle_unknown_user_error into main

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

  1. deploy the changes from this commit to id-test
  2. 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)
  3. go to: https://id.muni.cz/proxygui/heuristics
  4. look up a non-existent user ID, for example 123123123123
  5. an error message should appear warning the user of failing search result
  6. look up a valid user ID, for example 1 or 123, 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

Screenshot_2024-08-07_at_17.10.36

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

Merge request reports