PgPubSub.on() method

Sets 'error' event handler

Signature:

on(event: 'error', listener: typeof error): this;

Parameters

Parameter

Type

Description

event

'error'

'error' — an error occurred, including exhausting the reconnect limit

listener

typeof error

handler invoked when an error occurred, including exhausting the reconnect limit.

Returns:

this

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.