parse response for error message