Closed parmentf closed 9 years ago
This is not done, but we can do it like in ezpaarse-project/ezpaarse. But we have to integrate @MatthD's work before.
Existing code (especially operators) is written using promised-mongo, so the check for connecting to mongo can't be exactly the same as the one in ezpaarse.
Ooops. I forgot to close the connection to the database, when it works. Done in castorjs/castor-core@320f43ddf1c61bbe1920ee82ec0a6cd412cb4f91.
This is to be included in the "singleton" that @MatthD will use in the whole castor-core...
Often, when the connection to mongo does not work, the user forgot to launch it. And the error message is not explicit enough for a newbie.
Catch the connection errors, and then suggest to the user that he may have forgotten to launch the database.