Task query error handling