better error handling and run parser on body property of response