Absolutely true, but Graph-QL has never pretended to be REST.
- 0 Posts
- 14 Comments
deleted by creator
Valid, but dumb.
good old 418, always appears when you really want a cup of coffee
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.
Please, please, please, PLEASE return error-codes and problem-details.
Here’s the RFC: https://www.rfc-editor.org/rfc/rfc9457.html
Then just return a 500 - Server error. Nice and obscure.
The ability to separate “something wrong with what you sent” (4XX) and “something wrong on the server” (5XX) is very valuable in itself.
TomasEkeli@programming.devto
Programmer Humor@programming.dev•Everyone knows what an email address is, right? (Quiz)
4·6 months agoWould pass first validation, but fail when we try to send an email.
Successfully failed.
TomasEkeli@programming.devto
Programmer Humor@programming.dev•Everyone knows what an email address is, right? (Quiz)
10·6 months agoif i can email them and the user gets it - fine by me
TomasEkeli@programming.devto
Programmer Humor@programming.dev•Everyone knows what an email address is, right? (Quiz)
4·6 months agoThis is the way.
TomasEkeli@programming.devto
Programmer Humor@programming.dev•Everyone knows what an email address is, right? (Quiz)
14·6 months agoAlmost correct. ^.+@.+$
Too hard to validate properly to be worth it. Even if it is technically valid that’s insufficient. It must also work, and the easiest way to test that is to use it and verify that the user got what we sent.
TomasEkeli@programming.devto
Programmer Humor@programming.dev•Everyone knows what an email address is, right? (Quiz)
35·6 months agoI don’t validate emails, I test them.
That’s your email? OK, what did we send it? if we couldn’t send to it or the user can’t read it there’s no reason to accept it.
OK, maybe I do some light validation first, but I don’t trust the email address just because it’s email-address-shaped.
TomasEkeli@programming.devto
Programmer Humor@programming.dev•Why shouldn't you use YAML to store eye tracking data? /s
1·7 months agoJSON is valid YAML does not imply that YAML is valid JSON
TomasEkeli@programming.devto
Programmer Humor@programming.dev•Why shouldn't you use YAML to store eye tracking data? /s
6·7 months agoValid JSON is valid YAML.
So valid YAML can contain JSON
there’s no ‘i’ on that keyboard?