added http error response, took out debug printing