News for hackers. Stuff that matters.

Noishe

Re:How to (and how not to) design REST APIs on Wednesday November 22, 2023 @11:34PM (#38389306)
The thing about 404, is that you can both return 404 as well as an error document that has the structure the author is looking for, which means there is no reason why you can't return a 404 status.

Got 404, returned body is json, returned body is an error object, good to go.

Oh and, by returning a 404 you help intermediate caches know that they should not cache the response.

I pressed the green button a bunch. Like, a LOT. Zero is such a nice, healthy, round number.
It will taste better if you use water that is at 90C or 194F.
Re:Rare 'goat-sheep' born on Irish farm on Friday April 04, 2014 @05:33PM (#7534536)
There isn't enough attention to this in my opinion. When you research it, everything lines up so nice.