logoalt Hacker News

Insanityyesterday at 8:53 PM4 repliesview on HN

IMO if you show an error to end users it needs to be actionable. Tell them what to do instead (e.g retry or wait, use other input file, etc etc).

So don't say "InvalidArgumentException xyz", say "Expected a number but got 'hello'".

This doesn't always work, but essentially hide tech details from users. If you must, include a bit of extra information (a request number or whatever) that helps you log dive.


Replies

setrtoday at 7:45 AM

The action on an unhandled / unexpected exception is “please submit this information to your closest administrator”

And then dump whatever you want, with a copy button

show 1 reply
t-writescodetoday at 12:38 AM

Maybe in the UX; but for the love of all things, please shove that data in a user-accessible error log, with enough verbosity that someone could debug it themselves.

I am so tired of having to submit a HUGE FUCKING FILE that includes a ton of PII to customer support, only for them to ask the same “did you try uninstalling and reinstalling the app?” (Yes.) afterward.

8notetoday at 2:00 AM

expected what to be a number?

what i have is a string. how do i turn my string into a relevant number?