When raising an exception due to some failure could we include the response in the exception message. This would be helpful in long running scripts where we are logging information to be able to debug failures.
For example in publishItem the response is being printed to the output, but not added in the exception message.
if status['status'] == 'failed':
#if 'statusMessage' in status:
#print( status['statusMessage'])
print (str(status))
raise Exception("Could not publish item: %s" % itemId)
elif status['status'].lower() == "completed":
break
time.sleep(2)
return ui
else:
print (res)
raise Exception("Could not publish item: %s" % itemId)
else:
print (res)
raise Exception("Could not publish item: %s" % itemId)
When raising an exception due to some failure could we include the response in the exception message. This would be helpful in long running scripts where we are logging information to be able to debug failures.
For example in publishItem the response is being printed to the output, but not added in the exception message.