cockroachdb / cockroachdb/sequelize-cockroachdb
Error message when closing a connection too soon
- Lingua principale
- JavaScript
- Stelle
- 55
- Fork
- 18
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.