I like to return a error code property for each particular error case in the JSON body of the response. This allows you to determine exactly where in the code the error is from, and also allows the client to do fine-grained error handling in the UI if required. I&#x27;ve also found it incredibly useful to include a unique error ID with each request that is also logged server side, so that you can pinpoint the request in your logs and look up the context including previous and next requests.<p>It looks something like this:<p>HTTP 403
{
  errorCode: 403102,
  message: &quot;Missing required permission: IN_SOCIAL_NETWORK&quot;,
  id: &quot;064d6a1f-ba30-47de-8975-c319f01729ca&quot;
}