fix to show InvalidQueryError in err.error as error itself