Description
If query_expression.search raises an Exception, the following line cli_ctx.unregister_event(EVENT_INVOKER_FILTER_RESULT, filter_output) won't be executed, and the callback with error remains in the _event_handlers.
Az Interactive uses the same cli_ctx for every command execution, so if there is an exception related to --query, it will keep happening for any subsequent commands.
Related Issue https://github.com/Azure/azure-cli/issues/27228
Description If
query_expression.search
raises an Exception, the following linecli_ctx.unregister_event(EVENT_INVOKER_FILTER_RESULT, filter_output)
won't be executed, and the callback with error remains in the_event_handlers
. Az Interactive uses the samecli_ctx
for every command execution, so if there is an exception related to--query
, it will keep happening for any subsequent commands.