News for hackers. Stuff that matters.
Re:Most RESTful APIs Aren't RESTful by rplnt on Wednesday July 09, 2025 @04:56PM (#44514659)
You can mess up grpc just as much. Errors are a good place to start.
Re:Most RESTful APIs Aren't RESTful by cyberax on Wednesday July 09, 2025 @07:09PM (#44515636)
Wait until you hear about errors in REST...
Re:Most RESTful APIs Aren't RESTful by motorest on Thursday July 10, 2025 @01:59AM (#44517753)
What about errors in REST? It's HTTP status codes, and implementations are free to pick whatever approach they want for response documents. Some frameworks default to using Problem Details responses, but no one forces that.
Re:Most RESTful APIs Aren't RESTful by cyberax on Thursday July 10, 2025 @02:50PM (#44524233)
You can't rely on them because they can come from middleboxes (load balancers, proxies, captive portals in hotels, etc.).

So you can't rely on having structured errors for common codes such as 401/403/404, it's very typical to get unstructured text in payloads for such errors. Not a few REST bindings just fail with unhelpful serialization exceptions in such cases.

Re:Most RESTful APIs Aren't RESTful by bborud on Thursday July 10, 2025 @03:34PM (#44524694)
Could you elaborate?