Gracefully handling connections errors...
- Lingua principale
- JavaScript
- Stelle
- 2k
- Fork
- 238
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Maybe I'm missing something, but since the instantiation of the Schema class automatically does the connect behind the scenes without a callback, there is no way to gracefully handle connection errors.
Most other ORMs seem to provide a connect function with a callback that passes back an err object, as is the case when you perform a find operation with JugglingDB. If for some reason the server is unable to connect I want to gracefully handle the error and not kill the process. I could use Node's domains to catch the error, but it would be so much simpler to just have a callback. I see there is an event emitted when JugglingDB has connected, but other than that, what am I supposed to do? I rather like the this ORM (minus the thorough documentation), but this seems like a simple thing thats missing?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Look at the Schema class instantiation code to see where the connection is made. Identify how other ORMs handle connection errors with callbacks. Check for existing connection events in the codebase. The goal is to add a callback parameter or event listener for connection errors without breaking existing functionality.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, nodejs
- Ambito
- backend, databases
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100