db-migrate / db-migrate/mongodb
Friendly handling of connection failure
- Dominant language
- JavaScript
- Stars
- 25
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
There's no handling for failure of the MongoClient, I purpose we add some.
Ex, if the mongo instance is down, the following is thrown:
```
[ERROR] TypeError: Cannot read property 'createCollection' of null
at ./node_modules/db-migrate-mongodb/index.js:363:15
at connectCallback (./node_modules/db-migrate-mongodb/node_modules/mongodb/lib/mongo_client.js:527:5)
at ./node_modules/db-migrate-mongodb/node_modules/mongodb/lib/mongo_client.js:418:11
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
```
The other drivers do this:
https://github.com/db-migrate/mysql/blob/master/index.js#L508-L514
Cheers
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.