improved error handling in Generic Query tab