Handle application level 5XX errors
In addition to handling 5XX errors for the component/view level. Handle 5XX errors at the application level.
As an end user it would be helpful to see human readable errors indicating 5XX application status within a toast or modal/overlay. This notification would display a message indicating a server level problem, with status, and a timeout notification.
Acceptance Criteria
-
Verify a notification displays on a 5XX or undefined http status. -
Verify the notification displays relevant copy to the 5XX status -
[ ] Verify the notification logs the user out within a predefined timeOnly after there have been multiple (2+) subsequent 5XX errorsTBD during development: How much time?- UPDATE: As discussed outside of GitLab, we have decided not to do this automatic log out.
-
[ ] Verify that an issue for tracking integration tests exists and is referenced here.- UPDATE: As discussed in the comments below and outside of GitLab, we have decided not to implement integration tests here because it would be difficult to cause a 500 error that would trigger this new notification.
Assumptions and Questions
- Applying a timeout to the notification prevents the user from becoming frustrated with being unable to interact with the UI and API.
- There is a standard component thing in PatternFly for these toasts/modal/alert things that we will use.
- How do we force a 5XX error? Try to mock the connection, backend, or response? Maybe run briefly against a specially configured dev. server just to verify this functionality once?
- It sounds like David has a good trick for mocking this in dev. The UI uses a mock development server. In theory, we can add a forced mock status to that somewhere. David is going to look into this.
Relates to #43 (closed)
Edited by Brad Smith