Skip to content

ErrorEvent #126

Open
Open
@tapz

Description

@tapz

Steps to reproduce

import { Pool, neonConfig } from '@neondatabase/serverless';

...
const pool = new Pool({ connectionString: 'postgresql://postgres:password@localhost:54320/postgres' });
const result = await pool.query('SELECT id, name FROM sauna_location LIMIT 1');

Expected result

Returns rows from the database

Actual result

Throws ErrorEvent

Environment

Running in locally in MacOS, M2
ghcr.io/neondatabase/wsproxy:latest in Docker
"@neondatabase/serverless": "^0.10.4",
next.js 14.2.19
Vercel Edge runtime, servlerless function

Logs, links

ErrorEvent {
  [Symbol(type)]: 'error',
  [Symbol(kTarget)]: WebSocket {
  [Symbol(kEvents)]: SafeMap(4) {
  'error' => <ref *1> {
  size: 1,
  next: Listener {
  next: undefined,
  previous: [Circular *1],
  listener: [Function],
  flags: 0,
  callback: [Function]
},
  resistStopPropagation: false
},
  'message' => <ref *2> {
  size: 1,
  next: Listener {
  next: undefined,
  previous: [Circular *2],
  listener: [Function],
  flags: 0,
  callback: [Function]
},
  resistStopPropagation: false
},
  'close' => <ref *3> {
  size: 1,
  next: Listener {
  next: undefined,
  previous: [Circular *3],
  listener: [Function],
  flags: 0,
  callback: [Function]
},
  resistStopPropagation: false
},
  'open' => <ref *4> {
  size: 1,
  next: Listener {
  next: undefined,
  previous: [Circular *4],
  listener: [Function: handleWebSocketOpen],
  flags: 0,
  callback: [Function: handleWebSocketOpen]
},
  resistStopPropagation: false
}
},
  [Symbol(events.maxEventTargetListeners)]: 10,
  [Symbol(events.maxEventTargetListenersWarned)]: false,
  [Symbol(kHandlers)]: SafeMap(0) {},
  [Symbol(url)]: URL {  },
  [Symbol(controller)]: Fetch {
  _events: [Object: null prototype] {},
  _eventsCount: 0,
  _maxListeners: 21,
  dispatcher: Agent {
  _events: [Object: null prototype] {},
  _eventsCount: 0,
  _maxListeners: undefined,
  [Symbol(shapeMode)]: false,
  [Symbol(kCapture)]: false,
  [Symbol(destroyed)]: false,
  [Symbol(onDestroyed)]: null,
  [Symbol(closed)]: false,
  [Symbol(onClosed)]: [],
  [Symbol(dispatch interceptors)]: [ [Function] ],
  [Symbol(options)]: { connect: undefined, interceptors: undefined },
  [Symbol(maxRedirections)]: 0,
  [Symbol(factory)]: [Function: defaultFactory],
  [Symbol(clients)]: Map(1) { 'https://localhost' => WeakRef {  } },
  [Symbol(finalizer)]: { register: [Function: register] },
  [Symbol(onDrain)]: [Function],
  [Symbol(onConnect)]: [Function],
  [Symbol(onDisconnect)]: [Function],
  [Symbol(onConnectionError)]: [Function],
  [Symbol(Intercepted Dispatch)]: [Function: Intercept]
},
  connection: { abort: null, destroyed: true, destroy: [Function: destroy] },
  dump: false,
  state: 'terminated',
  [Symbol(shapeMode)]: false,
  [Symbol(kCapture)]: false
},
  [Symbol(ready state)]: 0,
  [Symbol(binary type)]: 'arraybuffer'
},
  [Symbol(kIsBeingDispatched)]: false
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions