translate return appropriate status code