make sure api returns responses that work with angular resource