4 ms·
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 h
by yashap 6y ago
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”}