cleanup graphite response to handle errors