Open SimoneZaza opened 6 months ago
@SimoneZaza need to be careful not to lose the actual string message that is being sent from the server as that may be relevant.
Discussed approach with Neil: Instead of hardcoding the errornumbers and text in the translation file, do it in a proper way to map all errornumbers to the code (strings). Do this in a file such as this one: https://github.com/alkem-io/server/blob/develop/src/common/enums/alkemio.error.status.ts Mapping the code (as also shown in above file) to the errornumber (that we have to create).
Then a hybrid approach: Showing the text "Oops, it seems like something went wrong. For more inforrmation, click here." And click here opens up a dialog, or expands the error message, showing:
It would also be nice to give each occuring error a number, so it is logged and can be found back in the logs.
Document with errors, messages (sheet 1), approach and an example (tab: Hybrid approach):
Description
As a user receiving an error, I want this error to be in normal English. As a user receiving an error, I want this error to be less scary. As a qa/developer, I maybe want to know what exactly is wrong when I have an error or receive a screenshot of an error. E.g. instead of INTERNAL_SERVER_ERROR, show: "Oops! It seems something went wrong. Please try to refresh. If this error persists, contact the team. #1020" in which #1020 can be some sort of code for the team to understand the exact error. + maybe a mailto link?
Acceptance criteria
Additional Context
Is this the correct file? /enums/alkemio.error.status.ts