-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Write about the importance of prioritizing helpful error messages in user facing segments of applications over just elevating verbose errors #4
Here's an example of what I deem bad and good user facing (or human) error messages:
BAD: Failed to process image!
What failed exactly? Encoding failure? I/O error? And most importantly what can I do to fix it?
Don't just tell me I got an error, tell me if and how I could fix it.
GOOD: Failed to encode image! The image might be corrupted! Error: No bytes in image, bla bla bla verbose error...
In this case we can't really fix it but at least now the user knows that this particular image file may be corrupted and that they can try a different one and attempt to further debug the issue with the verbose error message passed directly from the image encoding library.