Client.query(config, values, callback) sets config.callback, causing subsequent invocations to fail
Client.query(), when using promises (no callback), will via normalizeQueryConfig() set config.callback, which causes subsequent invocations of Client.query() with the same config to fail silently - no error message, just returning undefined.
Passed config should never be modified, this is a client-owned object.
Functions such as this should never fail silently - either return a valid value / defined error value, or raise exception.
Note: Using version 8.5.1, via TypeScript "@types/pg": "^7.14.9".
Passed config should never be modified, this is a client-owned object.
I agree with you. Do you have code to reproduce this? I can fix p quick.
Wanted to bump this, I'm seeing very similar behavior. I was switching from callbacks to promises and noticed client.query() began returning undefined periodically instead of returning a promise.
Wanted to bump this, I'm seeing very similar behavior. I was switching from callbacks to promises and noticed client.query() began returning undefined periodically instead of returning a promise.
Same here, I would love to see this fixed, as the issue heavily breaks my projects using this.