Added error message to query failed result to better diagnose connection errors.