Re:Write Better Error Messages
by rjmill on Wednesday October 19, 2022 @10:39AM
(#33262900)
> evidence at all that they would be read
I just had an idea: Put tracking info in the error URL. If your company has an internal URL shortener, that could do the trick.
More practically, I feel like it helps to put an empty line before the call to action. For many people, a traceback is just noise. The empty line helps split the useful info out from the traceback.
Or if it's a script/CLI (and you know the error reason) don't even show a traceback. Just print the error message to stderr, exit non-zero, and be done with it.
I just had an idea: Put tracking info in the error URL. If your company has an internal URL shortener, that could do the trick.
More practically, I feel like it helps to put an empty line before the call to action. For many people, a traceback is just noise. The empty line helps split the useful info out from the traceback.
Or if it's a script/CLI (and you know the error reason) don't even show a traceback. Just print the error message to stderr, exit non-zero, and be done with it.