Skip to content

Client.query(config, values, callback) sets config.callback, causing subsequent invocations to fail #2651

Open
@christerswahn

Description

@christerswahn

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions