I want to return proper status codes if something went wrong, e.g. 404 if a resource is not found or 403 if the permission is not sufficient.
In .net web api, one can express that with the return type. If you use IHttpActionResult or HttpResponseMessa…