diff --git a/src/azure-cli-core/azure/cli/core/commands/__init__.py b/src/azure-cli-core/azure/cli/core/commands/__init__.py index 830873967..bc634925f 100644 --- a/src/azure-cli-core/azure/cli/core/commands/__init__.py +++ b/src/azure-cli-core/azure/cli/core/commands/__init__.py @@ -706,8 +706,7 @@ class AzCliCommandInvoker(CommandInvoker): return event_data['result'] except Exception as ex: # pylint: disable=broad-except if cmd_copy.exception_handler: - cmd_copy.exception_handler(ex) - return CommandResultItem(None, exit_code=1, error=ex) + return cmd_copy.exception_handler(ex) six.reraise(*sys.exc_info()) def _run_jobs_serially(self, jobs, ids):