Skip to content

Commit 6049bd6

Browse files
committed
feat(error): set cause to MongoDB error reason on ServerSelection errors
Fix #15416
1 parent 9702ac2 commit 6049bd6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/error/serverSelection.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class MongooseServerSelectionError extends MongooseError {
4949
this[key] = err[key];
5050
}
5151
}
52+
this.cause = reason;
5253

5354
return this;
5455
}

0 commit comments

Comments
 (0)