dafky2000
dafky2000
Explore posts from servers
DDeno
Created by dafky2000 on 12/16/2024 in #help
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}`);
});
2 replies
DTDrizzle Team
Created by dafky2000 on 11/19/2024 in #help
malformed array literal when trying to insert a 2d array of strings
I am getting this error when trying to insert a 2d array of string into a .varchar().array().array() or a .jsonb() field. The error is: An internal error occurred.: malformed array literal: \"[[\"saddas\",\"dasdsad\",\"dadad\",\"sdasda\"],[\"123213\",\"1321312\",\"1231313\"],[\"111111111\"],[\"aaaaaaaaa\"]]\" It seems to me that drizzle is converting this array of arrays into this invalid serialized string. When I use .jsonb column type, the above is the error, when I use the varchar().array().array() I get the same error but with curly braces instead of square brackets. Pulling my hair out to figure out why this is isn't working as expected and I'm out of options. Thank you in advance 🙂
4 replies