Check error when query

Check error when query