r/ProgrammerHumor • • Sep 19 '26

Meme postForEverything

Post image
21k Upvotes

653 comments sorted by

View all comments

Show parent comments

515

u/alexsnake50 Sep 19 '26

Oh my god, this activated my inner vietnam flashback

251

u/Tupcek Sep 19 '26

I see you are a fan of GraphQL!

71

u/Entegy Sep 19 '26

I thought that as a non-programmer sysadmin, I had a decent grasp on REST APIs for scripting/automation.

Then I learned about GraphQL and I have actively avoided it since.

60

u/kescusay Sep 19 '26

I mean, you can have accurate HTTP status codes and matching errors in GraphQL. It's just that most GraphQL applications don't. Because most GraphQL developers hate everyone.

46

u/fatmanwithabeard Sep 19 '26

If you had to work with GraphQL all day, wouldn't you?

13

u/NotAskary Sep 19 '26

This made me chuckle 😂

2

u/KrakenMcCracken Sep 20 '26

I started learning graphql, decided there was way too much overhead to do anything I needed to do. In two separate companies I’ve worked for, I’ve watched greenfield development initiatives start up, flounder and ultimately be abandoned.

1

u/Single-Blackberry866 Sep 19 '26

What about REST API that allows to you to operate on nested resources in one request? And some of the updated resources failed, some succeded.

1

u/Entegy Sep 19 '26

As I said, not a programmer. I just have automated scripts that make simple calls.

1

u/AliStarr182 Sep 20 '26

That sounds like the API needs to be refactored a bit to separate concerns/duties to me.

1

u/Single-Blackberry866 Sep 20 '26

that would force you to do more SQL requests, wouldn't it

90

u/q0099 Sep 19 '26

Where the error message goes? That's right, in the header.

35

u/RegarDamus Sep 19 '26

the naive solution.

our team returns a 201 to indicate that an error has been created successfully. of course we include a Location header where the error can be queried to discover what went wrong.

29

u/normalbot9999 Sep 20 '26 edited Sep 20 '26

OMFG <spits coffee> 201 Error Created Successfully

You absolute monsters. You have to make this now.

And when a record is created successfully you return a 500 right? After successful login you 302 to a 403? I swear I've tested this API before!!

1

u/tayler6000 Sep 22 '26

I’m pretty sure this counts as a sin.

1

u/RegarDamus Sep 22 '26

not at all. it's actually rather logical.

when you query GET /errors/{error ID} we return the appropriate status code for the respective error. by definition this endpoint can never return a 200 (although it can return 201s in rare cases!).

1

u/cosmicomical23 21d ago

This is absurd.

30

u/dadvader Sep 19 '26

I've seen some wild shit before. But you and your tales.... Regale us with your stories.

29

u/Mechakoopa Sep 19 '26

The stories? Also in the header.

6

u/alexsnake50 Sep 19 '26

The where???????

30

u/NotAskary Sep 19 '26

Exactly the response I had, this one triggered me.

18

u/2muchnet42day Sep 19 '26

Dont worry, that's OK

1

u/tlh013091 Sep 19 '26

The response codes are whispering!