set http status code to api results whose status = error refs #126