neondatabase / serverless

Connect to Neon PostgreSQL from serverless/worker/edge functions

Home Page:https://www.npmjs.com/package/@neondatabase/serverless

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Broken links pointing to non-existing parts of the README

Jolg42 opened this issue · comments

In the source code, you will find these 2 links in error messages:

  • throw new Error(`No WebSocket proxy is configured. Please refer to https://github.com/neondatabase/serverless#run-your-own-websocket-proxy`);
  • this.emit('error', new Error('All attempts to open a WebSocket to connect to the database failed. Please refer to https://github.com/neondatabase/serverless#run-on-node'));

They point to the README, but the headline they are pointing to doesn't seem to exist anymore?

(at Prisma we use a URL shortener where we can update the link it points to for that use-case)

Thanks @Jolg42.

The first error message won't often be thrown any more (because a default proxy address is always set), but the second one will be. I've updated the links, so they'll be in the next package version.

It looks to me that the All attempts... message is also thrown when no neonConfig.webSocketConstructor is set when using Node. (Latest published version still uses https://github.com/neondatabase/serverless#run-on-node)

Thanks Jan. I wasn't sure this was important enough to make a release for, so I was just going to include this update in the next release.