this post was submitted on 14 Sep 2025
745 points (99.3% liked)

Programmer Humor

26332 readers
2139 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
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] TomasEkeli@programming.dev 40 points 1 day ago (4 children)

Please, please, please, PLEASE return error-codes and problem-details.

Here's the RFC: https://www.rfc-editor.org/rfc/rfc9457.html

[โ€“] douglasg14b@lemmy.world 0 points 10 hours ago (1 children)

Counter argument is that error codes and problem details can be used by attackers to reverse engineer and find exploitable parts of a system.

Within reason anyways

[โ€“] Feathercrown@lemmy.world 7 points 10 hours ago

So can a 200 response with an error description

[โ€“] darvit@lemmy.darvit.nl 5 points 18 hours ago (1 children)

This looks so over-engineered. Most of the time you only need an error message. Make the message clear enough so that it can be shown to the end user.

[โ€“] TomasEkeli@programming.dev 1 points 2 hours ago

Why even use HTTP, when you can just send bytes directly over the physical network card, right?

Because standards make it better for everyone. You've no idea when, who or in what context the error will happen or be received by.

It takes so little to return ProblemDetails, and improves the experience of devs using your API so much. Just do it. Stop thinking up edge cases and faffing about with excuses. Do it.

[โ€“] ryannathans@aussie.zone 1 points 17 hours ago (2 children)

It's often valid to serve a 200 OK with an error in the application data.