4 ms·
> This includes vague "something went wrong" errors Assuming you’re talking about things like Siri here, this just seems like a generic exception handler to me
by ninkendo 3y ago
> This includes vague "something went wrong" errors
Assuming you’re talking about things like Siri here, this just seems like a generic exception handler to me. If it has a better explanation for what happened (can’t connect to the internet or whatever), there’s usually a better error, the generic one sounds like an error of last resort. I can’t imagine a system where there isn’t some error like this one.
- BoppreH 3y agoI meant vague errors in all contexts. The system should know what categories of errors can happen, and report them as such. If the issue is that there's a space in the phone number field, it should never use the same message for failing to connect to the database. At the very least, an error should indicate if there's something I can do to fix it.
- J_cst 3y agoJust today I was writing a json response to an incorrect login. I had the option to discern and inform that the username was not correct, that the password was not correct, or both were not correct. I deliberately decided that I'd code and supply a single error message stating that there were 'something wrong with the credentials supplied'. So I stayed generic in order not to give additional info to any malicious user... so I believe there's at least one good reason to use a generic error message. Am I wrong?
- BoppreH 3y agoThat's ok, though I usually don't bother hiding this type of information. It's very hard to build an API where there's not a single endpoint that reveals whether a user exists or not (can I register with that email? can I send it a message? can I load its avatar?). And the user experience is affected, especially if they have multiple usernames.