What seems to be general practice in Web API for return types from action methods?
Returning CLR objects like so:
public IEnumerable
I think the first option is the best. In any case if there is no error the return code will be 200 without any setting on your side.
If there is any exception you could throw a HttpResponseException
with the appropiate code and message
throw new HttpResponseException(
Request.CreateResponse(HttpStatusCode.BadRequest, 'Your message'))