Static symptom check error management
RccPreConfiguredSymptomCheckService
handles the loading of static symptom checks. It performs a series of sanity checks on the received data (= scanned QR code) and throws errors on fail. Error codes defined here.
Right now, these are implemented as toasts. We should discuss whether this is user friendly:
- Toasts are only displayed for a few seconds, which may not be enough time to read and understand them.
- Toasts may invoke the idea that an error isn't that "serious" (since they disappear quickly) and might be ignored by users. However, a static symptom check that can't be loaded is actually quite a big problem.
Maybe use alerts instead?
Additionally, discuss how problems with the day query run should be handled. E.g., the QR scanning worked as expected, but in the query run one or more questions can't be found/accessed for whatever reason. Currently, this displays an empty query run with no questions. #1294 (closed) introduces a toast in the same fashion as RccPreConfiguredSymptomCheckService
– I think error management should be the same here.
Also, should translations for error codes be centralized, i.e. in app/generic/src/pat/i18n
instead of in the components? Currently for example, error code RCC-PAT-006-08
"Can't find question in store" would have to be in 2 i18n files: In pre-configured-symptom-checks
(along with error codes 1–5, error codes 6 and 7 are stored elsewhere, only adding to the confusion) and day-queries
. This seems hard to maintain.
Also, how much info do we want to give in the error messages? Right now, they're very generic, only informing the user that something is wrong. We should consider including the ID of the faulty symptom check/question/..., which might make troubleshooting easier.