DenoDDeno
Powered by
dafky2000D
Denoβ€’15mo agoβ€’
1 reply
dafky2000

Wierd issue with uncaught exception in WebSocketPovider on Canary

On stable the error listener block is executed but in canary (which I have been using as a fix to "Warning: Not implemented: ClientRequest.options.createConnection") the error doesn't seem to propogated to the listener and thus the rest of my code, instead an uncaught error is thrown, which is messing up my tests since I am expecting this error event to be thrown.

provider.on('connect', () => {
    console.info(`Connected to ${url}`);
});

provider.on('error', (error: any) => {
    console.error(`Error while connecting to ${url}:`, error);
});

provider.on('disconnect', () => {
    console.warn(`Disconnected from ${url}`);
});
provider.on('connect', () => {
    console.info(`Connected to ${url}`);
});

provider.on('error', (error: any) => {
    console.error(`Error while connecting to ${url}:`, error);
});

provider.on('disconnect', () => {
    console.warn(`Disconnected from ${url}`);
});
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

deno install not working on latest canary
huseyincansoyluHhuseyincansoylu / help
2y ago
Why am I getting an "Uncaught DOM Exception" in the Deno CLI?
Captain π—•π—˜π—˜π—™πŸ₯©CCaptain π—•π—˜π—˜π—™πŸ₯© / help
3y ago
on deploy: error: Uncaught (in promise) Error: Expected JSON
LaughsLLaughs / help
2y ago