I have an endpoint that return some live data for specific user (GET). And in most of the cases there is live data for most of the users, so I return the json body and 200 status code
, but in some cases the request is successful but there is just no data in Redis. What status code should I return in this case? (From my opinion is 204 NoContext
, but it cannot contain a body, so I was also thinking about 404
, but it make less sense, cause theoretically there is no error).
So what is the right status code should be returned in this case, regarding REST?