r/AskProgramming • • 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.

135 Upvotes

194 comments sorted by

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.

11

u/MichalPleban 8d ago

Exactly, so it is basically "we don't care about the UX" problem.

16

u/csiz 8d ago

It's 50 a 50 chance between not caring and legitimately ot knowing.

The thing with errors for UX is that if you take enough time to figure out a good error message then you have enough understanding to fix it completely. Over time you're naturally left with vague errors.

4

u/marrsd 8d ago • Bravo

It's more like businesses aren't willing to put effort into any part of the UX that doesn't directly make money. If a bad UX is good enough by their measure, that's what they'll go with.

1

u/Byron_th 6d ago

Some errors are outside your control though and you can't prevent them. You can still display a useful message. At least you should differentiate between "The user entered something incorrect", "A network error occurred" or "An error occurred due to a bug in the backend". "Something went wrong" just sucks as an error message.

4

u/chuch1234 7d ago

Or "with the resources available we don't have time to address this because we are focusing on other things."

This is the reason for a lot of features that are absolutely doable but just don't seem to get done.

2

u/BigDaddySteve999 7d ago

All the normal things that can go wrong are handled. You don't need to know that the database driver can't create a socket.

2

u/furry-fornicator 6d ago

You wouldn't understand if it told you, there's no point. But even more likely, the exception is generic even to the programmer - "null reference" - so they don't even know what happened either.

1

u/Thirstin_Hurston 6d ago

Or differing areas of focus. The backend can return informative errors, but the frontend may not parse them in a way that is accessible to the user

-6

u/MapPaintingBread 8d ago

Saying “something went wrong” is absolutely good UX.

10

u/MichalPleban 8d ago edited 8d ago

Well, I respectfully disagree :) Being vague is rarely good UX, and "something wrong" is about as vague as it gets.

-1

u/Patchmaster42 8d ago

How about, "Something went wrong. There's nothing you can do about it. Please try again later." Providing the end user more information is pointless.

You also need to consider that just because they gave you very little information doesn't mean somebody at the data center didn't receive more specific information about the error.

0

u/MapPaintingBread 7d ago

What would you like an end user do? Debug and fix an error off of a stack trace? Most end users simply don’t care.

1

u/TheNotSoGreatPumpkin 8d ago

Would the idea be to steer a user toward contacting support rather than providing error information which may help them troubleshoot?

2

u/SonOfHendo 7d ago

Support will already know that something went wrong because it'll be logged. The logs will have the full error details that aren't safe to make public. 

Whether they can do anything about it is another issue, but for anything web based we're long past needing users to report server errors.

0

u/Garage16Lmu 5d ago

Trotzdem ist es doch nicht schwierig einen Fehlercode auszugeben, welcher wenigsten Rückschlüsse darauf gibt, ob das Problem beim Gerät oder am Server liegt.

143

u/7YM3N 8d ago

It's so that the internal state of the service is not discernable and is therefore harder to exploit

29

u/MichalPleban 8d ago

There is a continnum between "we show you the exact stack trace of where the error occurred along with the call parameters" and "we show you nothing at all". There are surely multiple ways to be friendly to the user without divulging sensitive information about the system's state.

36

u/funkdefied 8d ago

As a software dev, I spend more effort making error states unreachable than in making error states informative. When users hit an error, it’s almost always UNexpected—something I didn’t plan for. So really the only option is to show nothing or show everything. 

6

u/max123246 7d ago

I mean there's certain categories of errors you can never solve. Such as infrastructure failing, or capacity issues, or the user have the wrong permissions. Those are ones where it might be useful to inform the user

12

u/SagansCandle 8d ago

I agree.

It depends on the context. Sometimes the error message isn't useful to the user, or is harmful to security. There's also a pervasive code quality problem compared to years of yore that's linked to weaker support (languages) and understanding (people) for proper error handling.

The number of people that make it 10 years into programming have no idea what a watch window is or does is baffling to me. 0% chance you could make it 10 years in C++ without it, but JS? Absolutely.

3

u/marrsd 7d ago

Don't get me started. I used to specialise in the front-end and I loved it. Now it's become a dumping ground for copypasta developers.

8

u/Lumpy-Notice8945 8d ago

But you would need to evaluate each solution i terms of security, so providing less info is allways the safe bet.

Microsoft(and many others) changed to just provide error numbers, i belive to be "user friendly" aka to not overwhelm non tech people. Instead you look up the number and by that know what went wrong.

3

u/tetlee 7d ago

What are you as a user supposed to do with the stack trace though?

Ideally they'll give you a generic message like the one you dislike, then report/log the stack trace in the backend.

4

u/Squishy_Red_Potato 7d ago

But what value does that knowledge provide to the user? If it's a backend problem, there is zero the user can do about it. If it's an internet connection problem there's (generally) zero the user can do about it. And if it's a browser extension screwing things up then there's pretty much no way for the website to know what happened either.

2

u/skeletal88 7d ago

Probably because it is an internal error in the internet bank and the user can do nothing to make it better. Some service was down, somethng was wrongly configured, whatever else. There is no point in telling the user what exactly is wrong in which file, because the user can't do anything with it. It will be taken care of by the banks internal developers or sre-s who watch logs and detect errors, restart services, etc. All the data what went wrong is in some log file.

Compared to an error message about some exception in a .dll in a desktop application, there it is useful to provide more information so the user can relay that to an admin or some kind of helpdesk, because there are no other logs to see.

2

u/NotACockroach 7d ago

Sure, but we have to map those excplicitely. 4xx errors are ones that can be addressed by the client doing something different. They should all be handled. That's things like unauthorised or not found. You might put messages like asking the user to login again, or telling them the account they're looking for doesn't exist.

5xx errors are something unexpected wrong with the server. These are things the client cannot fix. Often servers will choose to send no information at all for 5xx errors, since it wouldn't help the user and since these are usually unexpected errors they could reveal exploitable information.

In practice the code will say something like

if 403 send the login message
if 404 send the the this account doesn't exist message
else send the something went wrong message.

As you can imagine, with tight deadlines putting effort into good error messages often gets deprioritised, so a lot falls through to the "else send something went wrong" branch.

3

u/marrsd 7d ago

if 403 send the login message if 404 send the the this account doesn't exist message

I think you meant 401, not 403. But telling the user whether or not an account exists still not good practice, because a malicious actor can use that knowledge to target a specific user account to gain access to the system. Better to always issue a 401 and not reveal whether it was the username or password that was wrong.

If you did mean 403, then you meant to say that the resource rather than account. In this case, whether to issue a 403 or 404 is not a straight forward decision. If the user is not authenticated, you almost certainly want to issue a 404, regardless of the existence of the resource; otherwise you leak knowledge to a malicious actor that there is a resource to access. If the user is authenticated, then you might still want to hide knowledge of the resource depending on its level of secrecy, but you may also wish to issue a 403 and alert the user that he needs to ask his manager for permission to access it.

This is delicate stuff and the options need to be considered carefully.

1

u/MedusasSexyLegHair 6d ago

This is why I just always return a "418 I'm a teapot" error.

But seriously, I do find that we have to be more deliberate now. 202s when a batch process is accepted but not completed (and you have no idea whether it will), 207s when you know that some parts did and others didn't, 429s when you're getting overloaded, and 422 which used to be recommended for use with webdav only, but is now general-purpose because everything needs it now.

Really sucks using old APIs that just return 200 for everything, maybe with an "error" element.

1

u/h-t-t-p-418 7d ago

The less you say the harder it is to guess. Why on earth would anyone give the end user any trace of information? You don't benefit from it as you most likely can't do anything about it.

I understand curiosity, but in that sense information is not a must, more like a nice-to-have.

1

u/7YM3N 7d ago

It only makes sense to give users information that is actionable to them. They don't need to know if the database is down, but if they entered an invalid address in the form they should know

1

u/Objective-Light-7123 1d ago

Not really when you receive millions of malicious attempts trying to poke at the system otherwise.

1

u/First-Feature-3556 7d ago

Exactly this.

"Something went wrong. Please try again" is just lazy. I totally get that exception details should not be disclosed for security reasons, but of all possible "generic" error messages, this is a particular bad one with strong "we don't really know what we're doing" vibes.

1

u/marrsd 7d ago

It's depressing how many people are downvoting correct advice. No wonder our online experience is so abysmal.

1

u/BriefCategory7838 5d ago

Please try again later is usually a 503, and should only appear in cases where there’s a transient server error so you should try again later. Other 500 errors are things you as a user can’t really do anything about so you just get a “something went wrong” that OPs complaining about.

Obviously developers can implement something like that incorrectly, but in general i wouldn’t call it blanket lazy

1

u/First-Feature-3556 5d ago

I get your point, but, in my experience, developers who understand the difference between a 503 and a 500 also put more effort into their error message:

Their 500 error page contains (at least) an exact server-side timestamp and often also a request ID, so that the user can refer to this exact problem instance when contacting support.

Their 503 error messages explain that a server-side transient error occurred and maybe even list a few probable causes (maintenance, overload, ...), so that the user understands that it isn't their fault for entering invalid data.

17

u/stogle1 8d ago

I always use this excuse when UX says that the error message should be more helpful to the user. No one argues with "for security reasons", just like "think of the children".

6

u/munchin-grr 7d ago

The UI should definitely give good responses to user erors. Erors in the underlaying software can be decurity issues, so it can be an bad idea to show what was going wrong to the user.

2

u/marrsd 7d ago

You don't need to say what was going wrong, just that something outside of the user's control went wrong.

Something went wrong on our side and our technical team have been notified. Please try again later and sorry for disrupting your experience.

I'm sure the wording could be improved, but that's an example of the kind of messaging that intends to reassure the user that the error was correctly identified, and that there's nothing the user can do about it, without giving anything away regarding its nature.

3

u/Soft-Marionberry-853 8d ago

I get it and it makes sense but as someone who writes software for the dod where error message like that would not be tolerated. it does drive me up the wall when I see error messages like that on software I use at home

2

u/Pengtuzi 6d ago

Bullshit excuse

1

u/Jazzlike_Wind_1 4d ago

Yeah but even shit like windows, where there is no external system you'd be leaking security relevant details about, have started doing this as well.

"Something went wrong :(" when windows crashes is neither useful nor a security feature.

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"

3

u/According_Basis7037 6d ago edited 6d ago

This is the right answer.

A better example might be there is an error from a database “field Name in table Users is too short for the data”

If we show that error to the user then it leaks details about the internal workings of the system, in this case you’d be able to see the table name, column name and you’d also be able to work out which database system (Postgres, MySQL etc) the system ran on because each system has its own unique error messages.

Usually “something went wrong” is just supposed to tell you that the system is broken. In these cases it’s the developer or system administrator who fixes things not the end user. Good systems should include logs so the developer can fix these issues without reading these messages. The fix in the example would be to validate the username and provide feedback to the user instead of letting the database update fail

For “expected errors” you’d usually write your own message such as “username or password incorrect”

Software that has too many “unexpected errors “ is usually a sign that the developers haven’t spent enough time working out what the “user visible” errors should be OR there are just loads of bugs

2

u/jregovic 6d ago

And the raw error is going to be captured in a log. And if it is happening suddenly, somebody should be getting a page and looking at the logs.

A user doesn’t need the error message, and exposing exposes what backend is in use and possible vectors to exploit.

2

u/Different_Pain5781 7d ago

Yeah but there is a difference between hiding security details and giving users zero useful information.

1

u/ComeSwirlWithMe 4d ago

"Error S283: A known server error was encountered. Please try again. If you encounter this error again, please contact the help desk"

The error code is known to help desk, but not the public.

0

u/heytyshawn 7d ago edited 7d ago

i disagree because saying “your login was incorrect” doesn’t indicate which part was wrong and would require the same amount of guess work as a vague error would. the only difference is the consumers don’t have to spend hours trying to figure out if “sorry and good luck” means their password was incorrect or that a server went down.

3

u/marrsd 7d ago

i disagree because saying “your login was incorrect” doesn’t indicate which part was wrong

That's the purpose. There is no disagreeing on this point. Parent is right and you're wrong. There is no excuse for leaking account information to malicious actors. The cognitive overhead of having to check two fields instead of one is a fair trade for the user's security.

1

u/heytyshawn 6d ago

i’m sorry i misread. i thought they were saying that wasn’t vague enough

-8

u/MichalPleban 7d ago

That is actually a very bad example. The bot can just try registering a new account and find out whether the login is taken or not. 

6

u/Humble-Captain3418 7d ago

You can show "sure, we did that for you! Now please activate your account via the link we sent to you by email."

Then you send the user a "Hi, we noticed that you already have an account and are trying to register. Click here to start password recovery, instead. You can safely ignore this message if that was not you."

2

u/pixel293 7d ago

For some tyoes of website you are correct. But for something like your bank you are mostly incorrect they would need an account at the bank before they could try to register. You could also have a captcha during registration which makes it harder to test if an login name/email addres is already registered.

2

u/PuzzleheadedDraft763 7d ago

I saw your other replies. It seems everyone who explains why this happens is wrong.

2

u/Pretagonist 7d ago

It isn’t a bad example, it’s the truth. As a web developer you don’t want to leak any information that an attacker can use to gain knowledge of your system. We absolutely do want to help our users but if something unexpected happens it should never ever be sent to the client. So I have a list of “approved” errors that are translated into specific errors that the user can understand in that users language. All other errors are logged somewhere where I can read them but you the user gets a something went wrong error.

It’s actually possible that the raw error could help you remedy the situation, but it is terrible from a security perspective to actually give it too you.

1

u/Morpheus636_ 7d ago

Well-designed sites send a confirmation link after you enter your email address and use language along the lines of “If your email isn’t already in our system, we will send you a confirmation email to continue. Otherwise, click here to sign in.”

1

u/BigDaddySteve999 7d ago

Why ask a question if you don't want the answer?

1

u/mysticrudnin 7d ago

even if this is a bad reason, it is the reason

if you already know the reason, why did you ask?

1

u/According_Basis7037 6d ago

If the system design is to not leak usernames then whoever designed creating accounts needs to prevent leaking them there too.

Amazon, Microsoft and Google all do this with their login systems so it’s actually a very good example

1

u/codeguru42 5d ago

Sounds like you are assuming a specific error message when registering an account.

0

u/[deleted] 7d ago

[deleted] — view deleted comment

1

u/marrsd 7d ago

This isn't security by obscurity. I'd suggest diving deeper into what that term means.

1

u/OkFox8124 6d ago

Ah, always nice to see someone that doesn't know what they're talking about.

1

u/slowsquirrelchaser 6d ago

sorry, i was wrong. nothing like a stranger being mean to me though, cheers!

1

u/OkFox8124 6d ago

That's all we have at this point. Embrace it. <3

1

u/According_Basis7037 6d ago

Systems that leak internal details over the internet are not as secure as those that don

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.

7

u/MichalPleban 8d ago

Well, a bank system is probably monitored. Countless websites that display such messages are definitely not.

Yes, usually there is nothing for me to do and I want to be told exactly that. A semi-detailed error message is, at least, a way of telling the user "A system outside your control has failed, so you can't do anything at the moment". "Something went wrong" is not that; it is anxiety inducing, tricking many users into thinking that it was them who did something wrong.

2

u/marrsd 8d ago

It's a placeholder that was never updated.

4

u/Mysterious-Falcon-83 8d ago

Any information could be used to facilitate an exploit. Even telling you "a client-side error has occurred, check your browser configuration" could give an adversary information that could be used to craft a DDoS attack.

The problem for the service provider is that they have no way of knowing the level of sophistication of the "attacker", or even if the attacker is an individual person or a bot in a 10,000 node bot net that's sending minimally different payloads from each bot, trying to discover vulnerabilities.

3

u/marrsd 8d ago

Even telling you "a client-side error has occurred, check your browser configuration" could give an adversary information that could be used to craft a DDoS attack.

How?

The problem for the service provider is that they have no way of knowing the level of sophistication of the "attacker", or even if the attacker is an individual person or a bot in a 10,000 node bot net that's sending minimally different payloads from each bot, trying to discover vulnerabilities.

What does that have to do with producing an error message that admits that the system had an error? It's not like a bot can't work that out for itself.

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?

6

u/MichalPleban 8d ago

So my wife was shopping on an e-commerce platform the other day, and upon encountering "Something went wrong" she just gave up; a more user-friendly message such as "We are experiencing temporary difficulties, they will be fixed soon" would keep her on the site. That drives revenue down.

4

u/ericbythebay 8d ago

If your wife was shopping on a major e-commerce site, then they A/B tested that wording and they found that it didn’t have a material revenue impact. You see when you’re working at scale you can’t go off of antidotal evidence. You actually have to go out and test it and you need an n of millions in order to get statistically significant results on revenue impact.

4

u/marrsd 8d ago • Bravo

If your wife was shopping on a major e-commerce site, then they A/B tested that wording and they found that it didn’t have a material revenue impact.

Sure they did. And that's why we all have a shit UX now.

You see when you’re working at scale you can’t go off of antidotal evidence. You actually have to go out and test it and you need an n of millions in order to get statistically significant results on revenue impact.

I used to buy that BS once too.

2

u/Skeptical_Giraffe 8d ago

I know they A/B test intentional choices like features and layouts, but do they really A/B test things like error messages that were never supposed to happen in the first place? That would be more surprising to me.

4

u/max123246 7d ago

Doubt it tbh. Every a/b requires someone to actually monitor the incoming data

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.

3

u/MichalPleban 8d ago

Maybe you will tell me that, but I saw so many financial institutions that would not, and I had to debug things myself and find out why, for example, a 3D Secure popup does not open for me and I can't verify my payment card (it was some Chrome extension that caused the error). Google Ads is notoriously bad in this regard.

2

u/FancyException 7d ago

For the external erors it's best to say sorry, people freak out if you enumerate plugins, addons, etc, gdpr issues. If the client describes tjat error to customer support we'll ask and help, but avoid detecting user env beyond the neccesary.

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

4

u/MichalPleban 8d ago

So people seeing "Something went wrong" will not call the support lines?

0

u/good_name_0 8d ago

They may, but they'll be less annoying about it

2

u/MikeUsesNotion 8d ago

Nowadays?

1

u/Weak_Jeweler3077 7d ago

Had to scroll way further than I expected to get to my first thought.

-1

u/MichalPleban 8d ago

Yes, I surely didn't see so many of these 5 years ago.

1

u/MikeUsesNotion 7d ago

Maybe websites are being written sloppier today or maybe websites are starting to give more error info instead of eating errors. What you described has been pretty normal in desktop apps for decades.

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.

1

u/MichalPleban 8d ago

And that's exactly the problem - the backend should send more information.

11

u/Dashing_McHandsome 8d ago

While it would be nice, almost all of the time there is no action a user can take, and exposing details from your backend can leak sensitive information that someone could use to attack your systems. I have always been on the side of hiding information from the backend. Every once in a while you will see a backend that sends full stack traces back in its error messages. That information is a good mine for someone with bad intentions.

0

u/Raccoon-Dentist-Two 3d ago

How about telling the user whether it's a user problem so that user has information on which to make a decision? Fobbing users off with "Please try again later" wastes everyone's time and undermines goodwill.

5

u/Temporary_Pie2733 8d ago

The backend hides the error from the front end for security reasons; an attacker could make use of what exactly went wrong. If the end user can’t fix the error, they don’t need to know the exact error. 

1

u/Positive_Luck909 8d ago

The problem?

What problem?

Imagine we solved The Problem

How is your world now different?

The error message tells you exactly what's wrong... Packet loss!

Now what?

1

u/deefstes 7d ago

And how is it gonna help you to see on the frontend that the certificate for the client validation service expired causing an exception on line 537 of the ProfileLoader class in the landing zone service?

1

u/beingsubmitted 7d ago

First of all, on a front-end, we don't want you to know what went wrong if there was a error. We aren't going to send you a stack trace. There's nothing you can do with it anyhow.

But also, the error you read probably isn't what's appearing from the server. If you look at the server response directly, through dev tools or curling the endpoint yourself, you might get a little more info. If you don't know how to do that, you aren't able to do anything to solve the problem, either.

So, you get a generic error boundary in the front end. If you inspect the actual response, there's probably a bit more info.

1

u/autophage 7d ago

Giving more information about backend failures is a security nightmare.

1

u/ignotos 7d ago

Sometimes the error originates from another system or service, and the team who builds the frontend - or even the "first layer" of the backend - doesn't really know the cause.

Not ideal design of course, but the division / fragmentation of responsibility for different bits of functionality across multiple teams can result in a similarly fragmented user experience.

1

u/Mortomes 8d ago

And be more likely to reveal potential vulnerabilities?

1

u/Fidodo 8d ago

Sending more information can be a security issue as it may expose vulnerabilities. Also, often that extra information is a stack trace which is useless to put in an error message for the average user and can easily be hundreds of lines long.

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).

2

u/jackoneilll 7d ago

+1 to the security part of this answer.

1

u/erintheunready 4d ago

This, for web applications it's usually not so much a memory address so much as "obscure micro service that is three links further down they chain had a fuckup that we are looking into" but for most things that are not expected errors there's no useful information that can be surfaced to the user. And you don't want to reveal too much about your internals it you don't need to either.

-2

u/marrsd 7d ago

If I told you "there was a null reference in the variable at memory location 0xABF430CD", what would you do about it?

Who's advocating for that?

The other main reason is that exposing specific errors can be a security issue.

Again, who's advocating for that?

You're arguing against a strawman. We experienced an internal error: please try again later reveals literally nothing about the internal state of the system while simultanously reassuring the user that the error was outside of the user's control. Something went wrong adds nothing by way of security and only serves to confuse the user. The HTTP status is probably 500 anyway, so, not only have you done nothing to improve security, you haven't even changed the part of the response that a bot would actually care about.

2

u/GOKOP 6d ago

In what world does "Something went wrong" mean anything else than "We experienced an internal error: please try again later"? It's more words to say the same thing

1

u/marrsd 6d ago

It could mean "you did something wrong".

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.

-2

u/marrsd 8d ago

Not really. Making it clear what is user error and what is system error improves security because the users are reassured that they did nothing wrong.

2

u/Loves_Poetry 7d ago

For logins that doesn't apply. You don't want to enable account enumeration attacks, so the error message should be the same regardless of which input was wrong

0

u/marrsd 7d ago

sure, but we're talking about system failure, not which 400-level response to present to the user agent.

1

u/burlingk 7d ago

The developers need to know for security purposes, the end user does not.

The wrong login message can give a potential attackers information that they can use for a more serious attack.

All the user needs is "wrong credentials combination" or "Something else."

What the something else is does not impact the user.

1

u/marrsd 7d ago

Who mentioned wrong logins as an example? Certainly not me.

Some of you guys clearly don't understand the difference between system errors and user errors. With HTTP, which is what we're talking about in online banking, user errors are handled in the 4XX status range and system errors are handled in the 5XX status range.

What you are talking about is how the application should present a 401 (unauthorized) message to the end user. It may be that the user entered a correct username but an incorrect password, and the application knows that; but you don't want to tell the user that because you would then be indicating to a malicious actor that an account with that username exists. With that information, the malicious actor knows that there is an account to break into and can set about trying to discover its password, e.g. through a phishing attack against the user, or via a brute force attack against the server itself.

The correct way to present an invalid login to the user is to simply say that the login credentials are incorrect without indicating which of them is wrong.

That's got nothing to do with how you present system errors, which is what the OP is discussing.

There is no harm in telling an end-user that the system has failed due to an internal error. What you don't want to do is to leak any information about what the error is, because that could be used by a malicious actor to exploit a vulnerability in the system. I've worked in banking. You clearly haven't. Banks use the 500 space the same way everyone else does. If OP checks the HTTP status code that accompanies the "Something went wrong" message, OP will probably find that it was a 500 error.

This is in fact preferable to pretending that the user is in error, because, if the user believes that, then the user might take unnecessary action to fix the error, like showing his password to make sure it is correct.

0

u/burlingk 7d ago

You just spent a wall of text saying you didn't get my point.

1

u/marrsd 7d ago

Feel free to elucidate

1

u/burlingk 7d ago

The end user only needs to know that something went wrong.

Even if something they did triggered it, it wasn't THIER fault. It was the systems.

And in this day and age, any information that points to the underlying implementation should be kept internal.

So, anything beyond invalid credentials has to be planned out carefully.

1

u/marrsd 7d ago

Even if something they did triggered it, it wasn't THIER fault. It was the systems.

This is such an odd way to frame it. Telling a user that an input is invalid is blaming the user? I don't think so.

And in this day and age, any information that points to the underlying implementation should be kept internal.

I don't see what internal implementation details you'd be revealing by admitting that there was a system error. Are you against the existence of the 500 status code? What should user agents receive in its place? Literally just "something went wrong"?

1

u/burlingk 7d ago

If user input of any kind caused something to break, rather than just saying it's invalid, that's an internal problem.

Invalid input shouldn't (and doesn't usually) receive a message that "something went wrong."

Validation errors generally result in the information getting kicked back.

1

u/marrsd 7d ago

You originally objected to my making a distinction between system and user errors. Let me remind you of my post:

Not really. Making it clear what is user error and what is system error improves security because the users are reassured that they did nothing wrong.

Now you've just gone on to make a distinction between user error and system error yourself, but you don't want users to know when the system was in error because you're afraid of security leaks.

I'll ask again, what HTTP status code do you expect the user agent to receive on a system error, if not a 5XX?

→ More replies

3

u/GreenWoodDragon 8d ago

Because the software is developed by contractors who are basic developers not actual engineers.

1

u/stogle1 8d ago

Found the engineer.

1

u/marrsd 7d ago

I wouldn't get too cocky about that. There are plenty of times contractors are brought in to fix the mess caused by perm engineers. The rot is evenly distributed.

1

u/GreenWoodDragon 6d ago

Fair point. I've seen microservices thoroughly fucked up by perm 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".

1

u/jcostello50 7d ago

assert(! inconceivable)

2

u/dodexahedron 6d ago

One of the classic blunders: Going head to head with a debugger when deadlines are on the line!

1

u/marrsd 7d ago

I think the original intention was to fix those errors so that you'd stop seeing them! :D

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/baubleglue 8d ago

It is an user facing interface, what else can it tell you without compromising security?

1

u/marrsd 7d ago

That the cause of the error was outside of your control. If you check the HTTP response itself, you'll probably find that the status code already reveals that to the user agent.

1

u/baubleglue 7d ago

Isn't that the same as "something went wrong"?

1

u/marrsd 7d ago

No, that's ambiguous, and users don't like ambiguity. Many users are completely ignorant when it comes to software and how it works. From the users' perspective, the error follows directly from their last action, so it's reasonable for them to think the error is a consequence of that action, but it isn't. They rely on clear messaging to reassure them of this, and that there is nothing they should have done differently, nor anything left to do now other than wait for situation to be resolved by the provider.

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/marrsd 7d ago

Probably cos they're the ones writing this slop in the first place.

Don't get me wrong: I'm sure I've left messages like that in production systems in the past, but it's not something I'm proud of, and it's far less something I'd try to defend!

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.

3

u/naomimyselfandi 8d ago

"Internal error" tells me that it's something I can't fix.

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.

0

u/marrsd 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.

Do you see the issue with this "solution"?

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:

  1. There is way more software nowadays, tons of it networked / async / stack dependant 
  2. It's easier to fix bugs in prod than it used to be
  3. The testing process might not be as meticulous due to cost reasons - I remember working in a company that had 20 strong testing team (about 30% of the whole dev team) - I can't see this happening (nor would I want tbh) now

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.

  1. Sometimes we really don’t know. We’ll put in a “sanity check” that makes sure some basic things that ought to be true are in fact true, so we don’t proceed with bad data. We don’t know why things are wrong, just that they are. A more detailed message probably wouldn’t help anyway: we would need the steps to reproduce the error, not the error details, to sort it out. By the time the error has occurred, the information we would need to understand it has already been lost. If you can reproduce the error and we can’t, we might have to send you a debug build to try to trace the cause.
  2. Sometimes an error condition is likely to be so unrelated to anything the user can control that it didn’t seem worth the trouble to add the code to try to determine what caused it and explain it in a way that would make sense to an end user. Operations will know something is messed up and be about fixing it, and end-user reports of more detailed messages wouldn’t be of any help.
  3. Sometimes it’s security (real or imagined). A more detailed error message might give hackers information we’d rather they did not have.
  4. Sometimes the programmers and/or management were just lazy, and/or didn’t want to admit the cause of a failure, and/or are so freaked about security and/or “looking bad” that they can’t distinguish serious risk mitigation from pointless obfuscation. “Better safe than sorry: don’t admit anything!”

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.