adds better error handling when conditional fails (#17839)

When the conditional cannot extract a value from the result string,
an unhandled exception would be raised.  This fix now gracefully handles
the exception
pull/17837/merge
Peter Sprygada 9 years ago committed by GitHub
parent 9faf56a345
commit 5b4f3b1eda

@ -228,7 +228,7 @@ class Conditional(object):
if self.encoding in ['json', 'text']:
try:
return self.get_json(result)
except (IndexError, TypeError):
except (IndexError, TypeError, AttributeError):
msg = 'unable to apply conditional to result'
raise FailedConditionalError(msg, self.raw)

Loading…
Cancel
Save