asPromise should be mentioned in error handling documentation #14266
Labels
docs
This issue is due to a mistake or omission in the mongoosejs.com documentation
Milestone
Prerequisites
🚀 Feature Proposal
asPromise should be mentioned and given an example for in Connection. We are now told to use .catch and await for error handling but this can't be done for createConnection without asPromise which is not mentioned anywhere. There lacks an explanation how to do error handling for createConnection.
Motivation
It took several hours of work just to make simple error handling for createConnection because of the lack of this critical information and because error handling is a basic feature it should not be hidden away in docs/api
Example
Add a line like below or at least mention the need of asPromise in text.
The text was updated successfully, but these errors were encountered: