4 ms·
I’m pretty sure you just described GraphQL. All errors are 200 unless they are HTTP errors. The backend error is under the errors key in the json. All post re
by ncrmro 5y ago
I’m pretty sure you just described GraphQL.
All errors are 200 unless they are HTTP errors. The backend error is under the errors key in the json.
All post requests.
- mort96 5y agoHe just described, well, most web APIs. Client POSTs to some endpoint, the server responds with 200 and a payload. Application-level errors are part of the payload. Trying to merge the application API and HTTP concepts (like HTTP methods and HTTP response codes) seems to mostly just be a REST thing. Most other APIs treat HTTP as a transport layer in my experience.
- psturgeon 5y agoIgnoring all the layers of HTTP to use it as a dumb tunnel is a really effective way of forcing everyone to reinvent a lot of wheels at every phase of the interaction. A lot of people do it, its usually a brittle and expensive waste of time.