I'm not sure if that's an acceptable way of doing it but you can try out returning a task that will just give you the response you want:
// if version < 1
return new Task<HttpResponseMessage>(() =>
return Request.CreateResponse(HttpStatusCode.Unauthorized));