News for hackers. Stuff that matters.
Re:Best practices for REST API design (2020) by yashap on Monday February 22, 2021 @11:23AM (#26226295)
You can distinguish between them in your response body. A simple error response body for a JSON-oriented REST API is often something like a JSON object with a human-readable error message, and a unique code for that type of error. i.e. {“message”:”No such route”, “code”:”ad01fd04-8e9e-4326-9576-3d479fa20637”}

There are no comments on this comment yet.