This feature is experimental. MongoDB does not provide support for Snippets. This feature may be changed or removed at any time without prior notice.
Bugs are not expected, however should you encounter one, please open an issue in the GitHub repository for this project.
Error handlers allow you to specify regular expressions to catch runtime errors and display custom error messages.
... "description": "mongo compatibility script for mongosh", "main": "index.js", "errorMatchers": "error-matchers.js", "license": "SSPL", ...
For an example of error matching code, see the mongocompat snippet.