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
This commit is contained in:
parent
9faf56a345
commit
5b4f3b1eda
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue