I am trying to raise an exception only when a specific error message occurs. In my example I need the string stl_load_error
to be present in the error message.
try:
generic s3 copy command
except Exception as exec:
if 'stl_load_error' in exec:
When I evaluate exec
, exec
= {InternalError}Load into table some_table failed. Check stl_load_errors system table for details. \n
However, my code is breaking at the if statement. Is there a correct way to do this?