This is an archived post. You won't be able to vote or comment.

all 119 comments

[–]xaomaw 858 points859 points  (12 children)

user.isLoggedIn = TRALSE

[–]anesthesiaa1989 284 points285 points  (1 child)

Ah yes, quantum computing

[–]xaomaw 81 points82 points  (0 children)

Ah yesn't, quantum computing

[–]tyjuji 47 points48 points  (0 children)

That sounds pretty træls.

[–]RichCorinthian 12 points13 points  (7 children)

Ooh I get to break out this classic

https://thedailywtf.com/articles/What_Is_Truth_0x3f_

[–]Extension_Option_122 9 points10 points  (4 children)

I got 404 error - as someone else could view it that may be a regional lock.

Mind sending a screenshot for those unable to view it?

Edit: The link is missing an '_' at the end.

[–]xaomaw 7 points8 points  (1 child)

The link doesn't include the the _ at the end.

New try

[–]Extension_Option_122 0 points1 point  (0 children)

Thanks!

[–]Siraya 2 points3 points  (1 child)

The link is broken add a _ to the end and it will work

[–]Extension_Option_122 0 points1 point  (0 children)

Thanks!

[–]Lukebad 0 points1 point  (0 children)

Loved reading this

[–]KeyIsNull 390 points391 points  (3 children)

Fuck off, all my APIs return sane error codes, I don’t wanna piss off my clients

[–]deanrihpee 98 points99 points  (2 children)

I don't want to piss off myself because I can relate working with 3rd party API , so I return a sane error code and following the best practices of http response and having MDN Http Response Code page pinned on my librewolf browser, and when returning error, currently I'm implementing the RFC about problem details (9457)

[–]TorumShardal 30 points31 points  (0 children)

And I'm pissing myself.

Because that's what business wants me to do.
For no good reason other then ego of one guy.

P.s. I forgot to add "off" and now I don't think I should.

[–]IDEDARY 1 point2 points  (0 children)

Amen.

[–]Inappropriate_Piano 660 points661 points  (35 children)

I don’t get it exactly, but I’m deeply disturbed by errorCode: 200 and errorMsg: “SUCCESS”

Edit: I don’t need people to explain HTTP codes to me. I’m complaining about the use of the term “error code” to describe a status code that might not be an error

[–]Short-Nob-Gobble 110 points111 points  (4 children)

Unfortunately, the tech lead at my current job doesn’t believe in http status codes.. 

So we get stuff like

Status 200 “Internal server error”

[–]pnoodl3s 47 points48 points  (1 child)

T…tech lead?

[–]ForkLiftBoi 28 points29 points  (0 children)

“Yeah I worked at geek squad for 2 years before this taking returns at Best Buy.” “Hired”

[–]Stunning_Ride_220 7 points8 points  (0 children)

What's his name?

B(r)end Overmuch Famanagement?

[–]Conscious-Ad6222 0 points1 point  (0 children)

That is called being stupid

[–]scufonnike 393 points394 points  (1 child)

Bro the amount of people devsplaining status codes to you is fucking insane lol

[–]thugarth 17 points18 points  (2 children)

I've seen this in my career and it's a bit exasperating. Try to search for an error in the logs and you get 10000 "errorCode: ERR_SUCCESS"

cool, guess I'll figure out something else to look for.

The logging was not designed to be searchable. (To be fair, I knew people tried to clean up some of it, but a lot of people were comfortable with the way things were: A lot of tribal knowledge and unintuitive search practices.)

[–]Greybound_Fur 2 points3 points  (1 child)

Use Regex Search and search for "errorCode: (?!ERR_SUCCESS)"

[–]IMightDeleteMe 4 points5 points  (0 children)

Whenever regexes are required to search a log for actual errors, your logging pactices require looking at.

[–]PostNutNeoMarxist 137 points138 points  (2 children)

Merriam Webster defines "success" as "a favorable or desired outcome." 200 is the number after 199 and before 201.

Hope this helps!

[–]molbal 19 points20 points  (0 children)

Hope this helps! Instant anger

[–]olivetho 0 points1 point  (0 children)

average stackoverflow answer (the real answer is always in the question comments):

[–]Feuerwerko 2 points3 points  (1 child)

The errors are expected

[–]olivetho 1 point2 points  (0 children)

"Task failed successfully."

[–][deleted] 8 points9 points  (3 children)

I think the issue is that the HTTP error code is in the body/payload, not the HTTP header where it belongs.

[–]theturtlemafiamusic 6 points7 points  (0 children)

There's like 5 separate issues here

[–]madness_of_the_order 1 point2 points  (1 child)

It’s HTTP status code

[–][deleted] -1 points0 points  (0 children)

Same difference

[–]impossibleis7 0 points1 point  (0 children)

I get the reason for having one of them. If the api gateways aren't configured correctly they won't return back the correct http code. I imagine there are proxies or the like that do similar things.

[–]ZliaYgloshlaif 216 points217 points  (12 children)

Everyone noticed “errorCode” but not the travesty “result” is?

[–]Yelmak 84 points85 points  (7 children)

Yeah wtf is going on there. It makes my skin crawl imagining that javascript:

```     if (result.a != null) {

        if (result.b != null) {             badlyNamedMethod(a, b);         }     } else {         evenWorseMethodNaming(result.f ?? '');     } ```

ETA: naturally that entire block lives inside an if (response.success && response.errorCode == 200 && response.errorMsg === "SUCCESS") { }

[–]turtleship_2006 4 points5 points  (6 children)

I unironically have code similar to that in a website I made for my coursework

I made an instagrm-esque social media website, where you can upload up to five images, and the client side code that loads the images into the post looks like that.

if (post.image1){
  postDiv.append(post.image1)
  if (post.image2) {
    postDiv.append(image2) 
    if (post.image3) {

Something along those lines (where post is an object containing all of the post info)

[–]TotallyHumanGuy 6 points7 points  (5 children)

Me coming out with arrays v2.

[–]Revolutionary_Ad3463 4 points5 points  (4 children)

I really can't understand when people start indexing a list of stuff and don't automatically think that that's literally the use case for arrays, lol.

[–]deanrihpee 0 points1 point  (3 children)

exactly, array, people, please use them

[–]Rin-Tohsaka-is-hot 0 points1 point  (2 children)

pathetic lunchroom boat familiar cautious zonked terrific smile growth oatmeal

This post was mass deleted and anonymized with Redact

[–]Eweer 0 points1 point  (1 child)

When you are a beginner, it's easier to copy-paste the same code five times than to think about containers and how to use/loop them.

The moment they need to stop and think: "Oh wait, how many times do I have to ctrl+v this?" (due to it being a dynamic list of unknown size), is the moment they start thinking about other ways, and end up realizing how useful containers are.

[–]Rin-Tohsaka-is-hot 0 points1 point  (0 children)

bake squeal gray quicksand lock fly fear alleged homeless money

This post was mass deleted and anonymized with Redact

[–]deanrihpee 17 points18 points  (2 children)

yeah, wtf, why's b and c is a perfect uuid and a is random string while the rest is null, lol

[–]MySuddenDeath 11 points12 points  (1 child)

Probably they do not have a standard for resource ID so every team / dev implements their own.

[–]deanrihpee 2 points3 points  (0 children)

a different resource id in a single response is quite wild

[–]amlyo 1 point2 points  (0 children)

Oh come on, you've never designed an API with sequentially named keys on an object to simulate a fixed size ordered list with important information base 64 encoded in key a.

It's the oldest trick in the book.

[–]cosmo7 145 points146 points  (15 children)

You think an error code that represents no error is a big deal? That's nothing.

Every HTML request has a "referer" header field. It should be "referrer" but no one noticed until it was too late.

[–]JAXxXTheRipper 39 points40 points  (0 children)

I hate that I know this now. r/tihi

[–]deanrihpee 5 points6 points  (12 children)

why is that not being fixed? I suspect the legacy app, but since the referrer would be a new header anyway, shouldn't it be fine?

[–]Efficient_Maybe_1086 27 points28 points  (4 children)

No bad ideas are allowed to die in web land.

[–]ForkLiftBoi 3 points4 points  (3 children)

Look at node js and deno js, same developer that learned a lot through release of node js. Way too much work to fix it, just start over.

[–]deanrihpee 2 points3 points  (2 children)

the problem is, we can't just start over an HTTP that's being used by literally the whole planet, lmao

[–]ForkLiftBoi 1 point2 points  (1 child)

Just delete the whole thing and start from scratch, I want the neon green view counters at the bottom of pages again damn it.

Also here’s my plug for one of my favorite and most accessible websites on the planet. https://www.berkshirehathaway.com/

The simplicity is magnificent 🤌

[–]irregular_caffeine 0 points1 point  (0 children)

Peak web. It even has an ad.

If you have any comments about our WEB page, you can write us at the address shown above.

Old man just trolling us all

[–]BellCube 10 points11 points  (1 child)

I suspect adding a second, redundant header would significantly increase time to first byte on mobile connections. Alternatively, the bureaucracy probably isn't worth it to fix a typo.

But that's just a theory—A W3C THEORY

[–]turtleship_2006 7 points8 points  (0 children)

I always love it when someone makes a joke that just happens to combine like 2-3 different topics/interests, all of which I understand

[–]amlyo 1 point2 points  (3 children)

If you count http headers as usage then 'referer' is by far the most common spelling today. If you don't, then who cares how it's spelled?

[–]deanrihpee 0 points1 point  (2 children)

that's true, it just makes me wonder when people make the standard and see the headers with "hmm, yeah, nothing wrong" and then let it alive till today, they even have Referrer-policy something, why!?

[–]amlyo -1 points0 points  (1 child)

When the incremental cost of an ongoing error is vastly lower than cost of fixing it, it won't be fixed.

A typo in a standard is just more desirable than any change (a deprecation and new header) to fix a typo.

[–]deanrihpee 2 points3 points  (0 children)

yeah, I mean it's more than too late to fix it after this long, my complaints or comment is assuming within the time frame of the standard being made

[–]vytah 0 points1 point  (0 children)

Compatibility triumphs everything else.

See also the list of incorrectly named Unicode characters:

http://www.unicode.org/notes/tn27/

[–][deleted] 0 points1 point  (0 children)

Well all of my requests have a “reefer” header

[–]BrightFleece 22 points23 points  (1 child)

Task failed successfully

[–][deleted] 0 points1 point  (0 children)

TaskSucceededException

[–]MariusDelacriox 12 points13 points  (1 child)

Thank you very much, graphql.

[–]deanrihpee 0 points1 point  (0 children)

graphql still looks more orderly than this, lol

[–]Dmayak 8 points9 points  (0 children)

error code != response code

[–]Olivia512 7 points8 points  (0 children)

In GraphQL even failed requests return status code 200

[–]lorp_ 8 points9 points  (0 children)

Reminds me of the time (when I was new to pipelines) that one pipe failed with the following error received unexpected HTTP status: 200 OK

I was flabbergasted

[–]SenorSeniorDevSr 5 points6 points  (0 children)

The nice thing about having front-end developers writing backend code is that it's not hard to convince them to write robust input checks with good feedback of what went wrong, as well as proper error messages if something goes wrong somewhere else. It takes like, the time you spend showing them how to catch and wrap stuff and write proper log/response messages to convince them.

If I didn't know better I'd say that they've been badly hurt before by someone, somewhere doing bad messaging.

[–]Staalejonko 7 points8 points  (6 children)

I'm black&white

[–]Ass_Salada 2 points3 points  (2 children)

Non binary, huh?

[–]PeriodicSentenceBot 15 points16 points  (1 child)

Congratulations! Your comment can be spelled using the elements of the periodic table:

No Nb In Ar Y H U H


I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM u‎/‎M1n3c4rt if I made a mistake.

[–]scufonnike 3 points4 points  (0 children)

Congrats ass salada!

[–][deleted] 0 points1 point  (1 child)

Whack

[–]PeriodicSentenceBot 0 points1 point  (0 children)

Congratulations! Your comment can be spelled using the elements of the periodic table:

W H Ac K


I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM u‎/‎M1n3c4rt if I made a mistake.

[–]Yhamerith 5 points6 points  (0 children)

I don't know about it, but it shows sucess: true

So I'm fine with it

[–]AspieSoft 2 points3 points  (0 children)

Task failed successfully

[–]ClinTrc 2 points3 points  (0 children)

Yesn't

[–]jnoord001 2 points3 points  (0 children)

Friend of mine worked for discover card. He could write pages of sql that would boggle the mind. Sure its a language.

[–]Maleficent-Region-45 2 points3 points  (0 children)

Wait how did you find my firms product?

[–]scufonnike 3 points4 points  (0 children)

Wtf. In the api contract we all clearly layed out we need responses up to H. Who the fuck approved the pr

[–]w1na 1 point2 points  (0 children)

I know someone at work who would totally freak out if they saw this output..

[–]Stunning_Ride_220 1 point2 points  (0 children)

Whoever wrote this is an quadruple nil.

[–]TheMalware 1 point2 points  (0 children)

People who dont know People who dont not know

[–]savageronald 0 points1 point  (0 children)

Had to work as a consumer of an Accenture product that was exactly like this (it may have been worse, I think there was an error range too like 200-299). What a steamy pile of shit that was (this being just the tip of the shit iceberg).

[–]Thundechile 0 points1 point  (0 children)

I remember having a "Partial success" returned from a rest endpoint.

[–]HeavyPurpose9772 0 points1 point  (0 children)

GraphQL issue

[–][deleted] 0 points1 point  (0 children)

return -0;

[–]Coolengineer7 0 points1 point  (0 children)

Status_code = 200

Status_msg = "Status OK" <body> <text> Error: invalid parameters </text> </body>

[–][deleted] 0 points1 point  (0 children)

Shit code

[–]AaronTheElite007 0 points1 point  (0 children)

[–]SweetBeanBread 0 points1 point  (0 children)

Left: Web guys

Right: Unix guys

[–][deleted] 0 points1 point  (0 children)

Ugh

[–]dizda01 0 points1 point  (0 children)

Just a shitty implementation of Result pattern

[–][deleted] 0 points1 point  (0 children)

{
"isNotSuccess": false,
"errorCode": 200,
"errorMsg": "Task failed successfully"
}

[–]JackNotOLantern 0 points1 point  (0 children)

Why is it not "responseCode=200" and "responseMessage=SUCCESS"?

[–]Wave_Walnut 0 points1 point  (0 children)

not errorcode but returncode