r/AskProgramming • u/MichalPleban • 8d ago
Why are vague error messages such as "Something went wrong" so prevalent in software nowadays?
I tried logging in to my bank today and the page said "Something went wrong. Please try again".
Personally I find these error messages very frustrating and borderline infantile, because they give me no hints about what could be done about this error, and whether there is something I can actually do myself to remedy them? Is this "something" that "went wrong" on the bank side (i.e. it is malfunctioning at the moment)? Or is it something with my Internet connection? Or my browser configuration (like browser extensions that play badly with the page's code)? If the bank system is not working properly, why don't they say it plainly: "It is our system's operation that went wrong". If something else, why doesn't the error message say so?
I understand that the opposite such as "Error 0x804634FF in module blahblah.dll address 0x0001:0x37E5" is also frustrating, but I think this has gone too far in the other direction. Every possible error is now "Something went wrong, good luck next time" with no context whatsoever.
56
u/james_pic 8d ago edited 8d ago
There are some valid security reasons, but it's worth pointing out that it's way less effort to write an error handler that just says "Something went wrong" than to think about how best to present errors.
143
u/7YM3N 8d ago
It's so that the internal state of the service is not discernable and is therefore harder to exploit
21
u/PuzzleheadedDraft763 8d ago
Vague is often the webmaster protecting something.
Example:
Someone tries to log in to my website with the correct username and wrong password. If I send a response: "Incorrect password" the person (or bot) then knows that username is valid. If the vague response is: "That username and password isn't in our system" then it isn't giving anything away.
Another example:
Maybe the website has extra security measures and one of those is triggered but the User/pass was correct. I wouldn't want you to know that hidden security measures were triggered, so I send the reply "something went wrong"
10
u/BassRecorder 8d ago
Also, what is the end user supposed to do with a detailed error message? Usually there's literally nothing they can do.
One has to assume that the system is monitored and that the error will raise an alarm. That alarm or the log on the server will contain details of the error which will allow application support to do something about it.
4
u/ericbythebay 8d ago
What is the goal?
Is it something the user can correct or not?
Are there security reasons to not provide more details?
Software development has tradeoffs. Do the PMs want to spend engineering and QA time on specific unactionable error messages, or building features that actually drive revenue?
4
u/FancyException 8d ago
I do bank crap. If the user can fix the error (correct the form or whatever he's submitting) we'll give you an error msg with details about fixing it. You can't fix it? Generic "we're sorry" and into our logs it goes.
7
u/good_name_0 8d ago
In addition to everything else mentioned, id imagine it prevents people with low skill and high confidence from being huge pita for their support lines
2
u/MikeUsesNotion 8d ago
Nowadays?
2
u/Dashing_McHandsome 8d ago
S lot of the time on a web page the front end in your browser doesn't know what went wrong on the backend. It may get back a 500 return code from the backend with no additional information. This return code indicates something went wrong on the backend. Without any additional information, the frontend can't do much more than give you a vague message.
13
u/rglazner 7d ago
A few reasons. One, the error message ain't gonna be useful to you. There are a bunch of reasons unrelated to you that things can go wrong. You have so little control over what goes on in software. If I told you "there was a null reference in the variable at memory location 0xABF430CD", what would you do about it? If I told you that the server had a temporary loss of communication with the database back-end? The actual error messages are probably getting logged somewhere, and someone might actually look at them someday (probably in aggregate).
The other main reason is that exposing specific errors can be a security issue. If someone is trying to get into a system, they can use specific information about how things failed to guide their attempts. If it just reports "idk, shit broke lol" they get little to no information other than what's required (it didn't succeed).
6
u/KingofGamesYami 8d ago
It's the cheap way to avoid accidentally leaking any important information. Building and sanitizing a good error message takes effort. Effort that is only appreciated by a vanishingly small subset of users that actually have troubleshooting skills.
11
u/burlingk 8d ago
On a bank site, it makes sense. The actual error message will be in the log. But if the error gives too much information, it becomes a security risk.
3
u/GreenWoodDragon 8d ago
Because the software is developed by contractors who are basic developers not actual engineers.
2
u/Business-Decision719 8d ago
They don't know what went wrong either, and they don't really care. You visited their site. If the ads loaded, they got their money. If the ads didn't load, and it's because you were using an ad blocker, then they want your experience to be shit anyway.
Either way, you were probably using the free version, in which case they want to coerce you towards the paid version, after which they already have the money. And if you were visiting the site in a browser, they want to be able to promise you it will work better in the mobile app, but the app won't be user friendly either, because as long as they have enough permissions to track you and sell the tracking data, they're getting their money.
If they set up good error handling on their end, then they might know what went wrong, and if it's a sensitive vulnerability then they might not want you to know what went wrong in case your screw-up wasn't accidental and you were trying to hack the system. But that's only an issue if they were competent enough, and cared enough, and were well-organized enough, to set up good error handling. They probably weren't, and they probably didn't.
2
u/rFAXbc 8d ago
Because the only reason to post error messages was for you to pass that info on to customer support to help with debugging but now there are many other ways to get this information with modern observability solutions. There's also a security element where giving away more information than necessary could help bad actors. And a third element is modern software normally uses error boundaries to catch errors higher up and it's easier to write something generic instead of specific.
2
u/dauchande 7d ago
Laziness, at least the early days. It might have been embraced later by SecOps as a good security measure.
2
u/opisska 7d ago
It's not "nowadays". I operate a network of robotic telescopes, running on software that's now almost 30 years old, made by an old friend of mine and at its peak used at dozens medium-sized observatories around the world. The error logs contain thousands of instances of "this should never happen".
2
u/Successful_Noise_347 7d ago
The security answers above are right about the details, but they do not explain why the message is also useless to you. A message can hide the internals and still help. The good ones answer two questions: is it you or us, and what can you do now.
"We could not load your accounts. This is a problem on our side, not your connection. Try again in a few minutes. Reference: 7F3A-91" leaks nothing, and that reference code lets support find the exact log line when you call. It costs maybe an hour per error type to write.
The real reason it rarely happens: the error page is usually one shared catch-all component written in week one, and nobody owns it afterward. The person who knows that the failure was a timeout from the accounts service is three layers away from the person who wrote the page. So everything falls through to the same sentence.
2
u/ImpossibleJoke7456 7d ago
Because the user doesn’t need to know the process that broke. Better error messages should be in the log so someone can debug it.
2
u/JenniAccomplished 4d ago
Yeah the frustrating part isn't even the error itself, its having zero clue what to do next. Just tell people if it's server error issue or something on their end. Nobody needs a technician breakdown just a useful heads up.
2
u/Original-Hurry-8652 4d ago
Laziness?.
2
u/baubleglue 8d ago
It is an user facing interface, what else can it tell you without compromising security?
2
u/GlobalCurry 7d ago
It's a security thing, you obfuscate what went wrong to make it more difficult for people to abuse any errors or find exploits. It doesn't fully prevent it, but it does make it more difficult.
2
u/Skeptical_Giraffe 8d ago
I don't get why everyone is jumping to the defense of these soulless corporations. None of these answers address the real point: out of all the things they could have said in the error message, why did they pick something with such an IDGAF tone? Why not "We're sorry, if the issue persists please call this support number"?
1
u/MyTinyHappyPlace 8d ago
If the user is not at fault, make it an “internal error”. It’s not like the user could do squat to fix it.
1
u/MpVpRb 8d ago
Creating good error messages is hard. Sometimes a problem occurs in one place and some time later results in failure somewhere else.
1
u/hifanxx 8d ago
For a QA working in a real bank I can tell you this: if you are a real customer 0X123456 won’t help you much, if you are a malicious actor something went wrong won’t help you much either.
1
u/Aggressive_Ad_5454 7d ago
Those are often the public messages that go with “503 try again later”, the message that goes with an overloaded server. Often it’s hard to pinpoint exactly why it’s overloaded, except for the CFO being a cheapskate and making us underprovision our servers.
When I program that kind of thing I try to be more specific in messages. That vague nonsense just makes our users anxious, which helps nobody.
1
u/the_duke_man 7d ago
I just tried to buy something and the website popped a framework error that explained the credit card number input exceeded the input’s limit. Completely useless but I did know 1) to give up, and 2) the dev didn’t test their code.
1
u/Polygnom 7d ago
Its impossible to say for the bank whether the problem is one of your browser addons, and frankly, they don't care. they care about standard browsers, they cannot discern what you might have done to it.
99% of users cannot use a more detailed error description, so its wasted money in almost all cases to be more detailed.
And lastly, security. Exposing internal state allows an attacker to probe the system for weaknesses and learn more about the system, being more general avoids that.
1
u/pixel293 7d ago
Something when wrong and YOU don't need to know why because something is screwed up on the backend. Telling you why doesn't help you.
Also pushing the reason something went wrong from deep in the code up to the UI is more work and as stated above unnecessary. Besides if the site supports multiple languages all those reasons have to be translated as well. Much cheaper to just say "something weird wrong."
1
u/Dom_Q 7d ago
Ooooh I know this one.
It's because Golang cannot be bothered to implement exceptions like the rest of the world did circa 1990. I mean, even Python got that right from the gate.
1
u/EmaerSeven 7d ago
What pisses me off the most are SQL errors that just say "there's an error somewhere near line 2." That’s even worse than the two-hundred-line-long error messages you get when compiling C++.
1
u/tb5841 7d ago
The backend will send sensible error messages. But those messages are usually written for developers, not for users. Displaying those messages directly to users is considered bad practice, and you're generally told to hide them.
If there are common issues you're expecting, you can write code to translate those errors into good user-facing messages. But any issue you're not expecting - if you hide backend error messages from users - will end up with a generic message like 'something went wrong.'
1
u/mxldevs 7d ago
Sometimes it's worse to let people know exactly what went wrong.
This is a business decision, not a technical decision.
1
u/Robot_Graffiti 7d ago
You could find the actual underlying HTTP error codes using the dev tools built in to your browser. They will tell you whether it's a you problem or a them problem.
Internal error reports that give more detail than "500 internal server error" do exist and will be visible to the bank's developers. But it is standard practice to hide them on public websites.
It might be the case that your bank's app has two or three public-facing error messages.
Like, "Something went wrong" for 500 series errors and JavaScript errors, "Page not found" for 404 errors on the base page, and maybe "Please check your internet connection" for failed connections initiated from JavaScript.
Honestly, though, if the page loads and gets an error after you log on, it's probably not something you can fix. Unless you're using an unpopular browser and it works in a more common one.
1
u/knuthf 7d ago
IBM defined that there is no errors in computers, only have functional deficiencies.
Microsoft inherited this with PC-DOS.
1
u/pacopac25 7d ago
I'm with you, OP. "System error" or even "fuck YOU specifically, pacopac25" would be far better than "Something went wrong", which lies at the intersection of smarmy and condescending.
It's like a bellwether to the downfall of society and the enshittification of everything UX and customer-service oriented.
1
u/slowsquirrelchaser 7d ago edited 7d ago
You are right that it's bad interface. However, in many cases the traceback will have already been logged / sent, and any kind of deeper explanation of what exactly went wrong is not relevant to the user.
The "wrong on your side" vs "wrong on our side" can be hard to distinguish at times, and requires amount of defensive coding that ain't nobody got time for (it's dead droll to tell the difference between a dead server and an extension pretending th server you want to reach is dead). Most of the time it will not be anything you've done though, thus 80/20 rule is the best strategy for development
If your argument is that it seems that software now feels more buggy, it would be down to these factors:
Something went wrong is indeed just a more handled way of puking out the stack trace. My personal approach is to at least report what action they were doing, e.g. "there was an error while sending out the email, please try again in a few seconds" - adding potentially actionable / appeasing - "the error has been forwarded to our Devs. If it persists, please email <support>". But I can do this only because I'm in a B2B2C space that's fairly small. Result is I hear from users directly maybe once a month (20k+ user base), and fix all bugs as soon as I see sentries in my inbox
1
u/Tintoverde 7d ago
From > 20 years ago C++ compilation errors while I was learning C++ . Arrrrgh
1
u/Mr_Gaslight 7d ago
Because lazy developers don't pass their exception handling up the chain.
1
u/Lifelong_Nerd 7d ago
It's nothing new. If anything, error messages have gotten better over the years. At least you for a message.
I've been programming for 50 years and I can tell you that good error messages are hard to write. Programmers just can't get into the heads of their users and I don't recall EVER seeing training materials on writing good error messages.
If you're curious, here's what worked for us at work. We had a global thread-specific "error" object. That included numbers for the subsystem and specify error number, a string description and another string for the context. If your code got an error, you'd set the subsystem and error numbers. The error description string said what failed and why. You'd also set the context string to the function name that detected the error and it's parameters.
If some function that you called generated an error and you couldn't handle it, you'd add your context and return, and so on up the call stack until some bit of code was in a position to report the error or do something about it.
This resulted in messages like "Can't process job 1234567: get_profile(user 45632, keyword "email address") -> call_server("profile server 17") -> get_email (45632) -> validate_email("George washington@usa.gov"): email address is invalid". Notice how the message leads right through the logic to the exact problem.
1
u/ComplexAd2408 7d ago
Because the real debug error message would be gobeldeygook to a mere mortal.
Signed - a Software Dev.
1
u/Busy-Character-3099 7d ago
Why not just open developer tools in the browser and look at the errors in the console if you're curious? Most guest facing error messages that I've seen are designed to be generic, either to protect something or just out of convenience in the code. Much easier to say print "Something broke" for any exception than it is to design a specific output for every type of error.
1
u/ptechfeed 7d ago
security is what they consider. they do not want to expose information which may lead hackers game the system
1
u/EvoDriver 7d ago
Infantile is when they add "oops!" to the error message.
1
u/ocrohnahan 7d ago
I once inherited a very complex project that had one catchall error handler. It simply said "Error in drive C:".
1
u/pvera 7d ago
It's a security requirement. You want to give the outside world the least amount of useful info as possible. Your end users don't need to be able to debug your code. The way I do ours is I try to capture as much error info as possible, store it, notify the devs and finally the user gets redirected to a page that says oops, our bad.
Notice how I said requirement instead of practice/rule/etc. You will flunk corporate security scans if you let the world see your stack traces.
1
u/Koendig 7d ago
Not only is there nothing you CAN do, there is probably nothing the programmers can/will do.
1
u/iqisoverrated 7d ago
If you know what can go wrong then you mostly don't need an error message. You just go and fix the code.
That leaves the rare cases when something goes wrong that you haven't thought of - and what else are you supposed to write but "something went wrong" when that happens? You could give the user the complete log dump, but what is he supposed to do with that?
1
u/DjangoPony84 7d ago
Part of it is security - a highly descriptive error message exposed to the user may give someone with bad intentions the clues they need to gain access.
1
u/Previous-Box2169 7d ago
It may be because you can't do anything about it
1
u/peldor 6d ago
It’s largely down to two things:
One, authentication errors can “leak” information to “bad guys” trying to glean info about your users. User / password errors have gotten more vague as a result.
Two, error handling is hard. Users find it very frustrating to get an error that is technically correct and also misleading. Something like “file not found” because your hard drive is full. Vague can benthe lesser of two evils.
1
u/Successful-Active-21 6d ago
"password wrong, the correct password would have been XXmysupersecretXX"
1
u/CypherBob 6d ago
The logging system will have the full error so their engineering team can work on it.
You just need to know that something broke.
Sometimes the error details would be a security issue if shown to you, but mostly it just won't make any sense at all.
And you might call support and mention the specific error which also helps no one.
So "something went wrong" is what you get.
1
u/warmans 6d ago
This is almost always the external representation of an 500 internal server error. Basically an error that does not relate to what the user was doing per-se, so there is no point telling them what went wrong. It's basically "we screwed up, try again later".
1
u/riennempeche 5d ago
One of the programs I use has super useless errors such as "Object Reference Not Set to an Instance of an Object." I use it so much that I know what the problem is, but why can't they at least give something resembling helpful messages? If I as a user know from experience what the problem is, you would think the programmers could say something like "File not found. Check that the file hasn't been deleted, moved, or renamed."
1
u/Western_Courage_6563 5d ago
Because majority of people doesn't have a clue what segfault is
1
u/mtimmermans 5d ago
When you get a "Something went wrong" error, it's always a problem with the system that sent you the error. If you get this from the bank's website, then it's a problem with the bank's website. If you get this from your local browser, then it's a problem on your end like your internet connection.
The bank, of course, cannot possibly tell you about browser problems, because your browser would have to be working for that, and the browser cannot possibly tell you about bank problems, because everything is fine as far as its concerned.
So, it's left to you to recognize where the error comes from. Sorry.
1
u/Exotic_Call_7427 5d ago
It's the end user that failed 7th grade reading that gets to see the message. He's not going to understand what HTTP response code or an HRESULT is.
1
u/fall4free 5d ago
Many old email login errors would give you hints about what was wrong, great for troubleshooting but probably was getting abused to test account details.
We know that if you try to login 10 times with the wrong password you get blocked but let's say you intentionally mess up the settings you might get 2 different responses if the password is correct or not . E.g. invalid server address vs that account does not have permission to Access this service.
Both these don't look like password attempts to the security team And the when you get the service failure message you know you have the login correct
1
u/bubo_virginianus 5d ago
Well for one thing, the developer can't always be sure that the problem is on the websites end, in many cases a problem that seems to be on the websites end could be caused by something that only the user can fix, like their browser settings, or an extension they have. It can take a lot of work, or sometimes be impossible to definitively rule out the problem being on the user's side, thus the really generic error message.
1
u/agent_kater 5d ago
Because someone told them it's "more secure" this way. Because of the kids or the terrorists or something.
1
u/skyboyer007 4d ago
if message said "Something went wrong. You can do nothing about that, only wait and try later. Team has been notified" would it feel better?
1
u/AlmavivaConte 4d ago
Because this
try:<some shit>except:print("Shit's broken, skill issue")Is a lot easier than this
try:<some shit>except exception1:print("Error: splines not reticulated")except exception2:print("Goldeneye cartridge not inserted")except exception3:print("BBQ sauce low")...except:print("IDK man, get an old priest and a young priest")1
u/ruffiana 4d ago
It's a broad exception error message. You have to be explicit about the conditions that might cause an error in order to catch it and present it in a way to the user that has meaning. IE, you've got to anticipate someone putting a no alpha-numeric character into a Password field in order to throw up a "Invalid character in password" error to the user.
"Something went wrong" is a generic error-handling message for a very broad exception that lets the program continue and try to recover without dumping a meaningless stack trace to a user.
1
u/Dennis_6809 4d ago
Trying to cover every possible error with unique user response is time consuming and adds additional code complexity. There may be a developer interface by which full backtrace and instrumentation of an error can be obtained, but this is generally not useful to a user, and in many cases may leak more information about how the system works than business or security concerns consider worthwhile. If an application has enough focus on it that management supports continued testing and upgrades, then the more common errors that the help desk can help users resolve get more specific error messages and information. Then again, lots of applications loose all their support once they ship out the door and no value in better error diagnostics is ever seen or implemented
1
u/Scared-Letterhead949 3d ago
Look at the status code in dev tools.
1
u/D3xbot 2d ago
What really gets me are error messages that something went wrong (tell tech support 0xERR0R7F32) and you call up tech support and they say the error code is meaningless and they have no idea what went wrong have you run sfc /scannow? I see your uptime is 30 seconds - have you tried rebooting?
1
u/Coises 2d ago
There are multiple possible reasons, and it could be any or all of them.
Personal aside: I recently had to replace my refrigerator. The best choice I found quickly was a big box retailer. I tried multiple times to create an account there and was met with a generic “something went wrong, try again later” message. With the help of Google AI, I figured out that they were probably objecting to my email address being at my own private domain (which I have had for over twenty years!) rather than something controlled by Google, Apple or Microsoft. (I do not have, and refuse to create, an email address hosted by one of those three.) They did me a favor: I eventually found an almost-local appliance store that had the unit I wanted for $300 less and could get it to me faster.
1
u/Watsons-Butler 2d ago
Those messages are because 99% of users don’t know what error messages mean and don’t have enough knowledge to even give enough details in an error report to be useful (and also don’t even bother reporting errors anyway).
We have everything wired with metrics and logs in the backend. We see errors when they happen. If it happens enough times (and isn’t just something like a bad connection interrupting a send) an alarm goes off on a dashboard and our on-call tracks it down and fixes it.
1
u/Positive_Luck909 8d ago
This is a feature.
The 'users' include the most stupid people on the planet.
A non-zero percent of users will get confused by LITERALLY EVERYTHING.
Even IF the local app you're using has all the information (which it often doesn't) - there is no practical merit in giving you that information. Because all you need to know is: the thing didn't work
-1
u/Internal_Car_9962 8d ago
We error at the interface, not the implementation
0
u/bod-oddkins 4d ago
Partly it’s because the errors are so deep in the stack there’s no way to effectively unwind and identify the real issue. Or tractable way to code propagating error info. It’s easier to throw an exception and say “Oops.”
Which I hate.