This example code outputs an error:
const { Sequelize } = require("sequelize-cockroachdb");
const sequelize = new Sequelize(process.env.DATABASE_URL);
(async () => {
try {
const [results, metadata] = await sequelize.query("SELECT NOW()");
console.log(results);
} catch (err) {
console.error("error executing query:", err);
} finally {
await sequelize.close();
}
})();
The error is as follows:
Executing (default): SELECT version() AS version
Executing (default): SELECT NOW()
Executing (default): SELECT crdb_internal.increment_feature_counter(concat('Sequelize ', '6.19'))
[ { now: 2022-05-23T20:29:50.787Z } ]
Could not record telemetry.
Error: ConnectionManager.getConnection was called after the connection manager was closed!
We suspect that this problem was because the connection was closed quickly. However, the user didn't really do anything wrong in this case, nor do they likely care whether the telemetry was recorded successfully. Suggested solution: don't output a user-facing error when we fail to record telemetry.
CC @rafiss @RichardJCai
This example code outputs an error:
The error is as follows:
We suspect that this problem was because the connection was closed quickly. However, the user didn't really do anything wrong in this case, nor do they likely care whether the telemetry was recorded successfully. Suggested solution: don't output a user-facing error when we fail to record telemetry.
CC @rafiss @RichardJCai