Remove catch exception for MiddlewareQueryException as it is not being used anymore

Issue: GCP-9732

Reviewer: Mae Isabelle Turiana