Call _handle_query_error correctly

Call _handle_query_error correctly passing in the
correct parameters.
Closes-Bug: 1365741

Change-Id: I9bb284feb34b8a8f21117ad505f3c3846edbeb8d
Merge "Call _handle_query_error correctly"