this post was submitted on 22 Mar 2025
752 points (98.8% liked)

Programmer Humor

22187 readers
1692 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
(page 2) 35 comments
sorted by: hot top controversial new old
[–] tiredofsametab@fedia.io 3 points 1 week ago (5 children)

me with gRPC error codes: nil, parameter error, app error -- OK, you fucked up, we fucked up. Edit: forgot NotFound.

I really should read about the various ones that exist at some point, but I've always got bigger fires to put out.

Edit, since it seems unclear, gRPC != HTTP and does not use the same status codes. I meant that I felt like I was using fewer than I should, though I just checked and basically not.

load more comments (5 replies)
[–] KindaABigDyl@programming.dev 2 points 1 week ago

You can put anything in your dialog box

[–] renzev@lemmy.world -1 points 1 week ago

This is a good practice tho. The HTTP code describes the status of the HTTP operation. Did the server handle it? No? Was the url not found? Did it time out? Was the payload too large? And the JSON describes the result of the backend operation. So 200 OK with error: true means that your HTTP request was all good, but the actual operation bugged out for whatever reason. If you try to indicate errors in the backend with a HTTP error code, you quickly get confused about which codes can happen for what reason.

load more comments
view more: ‹ prev next ›