n1qlTimeout exceeded without errors and partial data is received

Hi @brett19.
I think that the behaviour of reporting the error through the first parameter rather than hidden in the 3rd is correct behavior.

BTW Looking at the code review, I see the following issues

  1. Seems that you’ve deleted the errors object from meta ( 682: delete meta.errors;) I don’t think this is a good idea, because you don’t know who (today) is already relying on this parameter, I would keep it for backward compatibility (also it is actually not a mistake…)

  2. Wrong parameter passing, second parameter in error emit, is meta in one place and jsonError in the second
    emitter.emit(‘error’, err, meta, rows);
    emitter.emit(‘error’, err, jsonError);
    (Will result in inconsistent arguments to caller)

  3. Not declaring of the err variable (will result in it becoming global)

  4. I wonder if we can avoid the duplication of the code, seems like the new changes are word to word from the else scope.