alkem-io / server

Core server in the Alkemio platform, offering a GraphQL api for interacting with the logical domain model.
http://alkem.io
European Union Public License 1.2
26 stars 4 forks source link

Change error text #3975

Open SimoneZaza opened 6 months ago

SimoneZaza commented 6 months ago

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

techsmyth commented 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.

DonnaDuiker commented 23 hours ago

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.

DonnaDuiker commented 18 hours ago

Document with errors, messages (sheet 1), approach and an example (tab: Hybrid approach):

https://stichtingcherrytwist-my.sharepoint.com/:x:/g/personal/donna_alkem_io/EZqLzUSeXulFsKVkTvfHDQ4BtsyRqxdkc1zURF0K-4jE7Q?e=KBvgaW