@mongosh/errors
Advanced tools
Comparing version 2.0.2 to 2.1.0
@@ -38,2 +38,24 @@ # mongosh Error Codes Overview | ||
#### `ASYNC-10013` | ||
Signals the iteration of a Mongosh API object in a place where it is not supported. | ||
This occurs inside of constructors and (non-async) generator functions. | ||
Examples causing error: | ||
```javascript | ||
class SomeClass { | ||
constructor() { | ||
for (const item of db.coll.find()) { ... } | ||
} | ||
} | ||
function*() { | ||
for (const item of db.coll.find()) yield item; | ||
yield* db.coll.find(); | ||
} | ||
``` | ||
**Solution: Do not use calls directly in such functions. If necessary, place these calls in an inner 'async' function.** | ||
## @mongosh/cli-repl | ||
@@ -40,0 +62,0 @@ |
{ | ||
"name": "@mongosh/errors", | ||
"version": "2.0.2", | ||
"version": "2.1.0", | ||
"description": "MongoDB Shell Errors Package", | ||
@@ -48,3 +48,3 @@ "homepage": "https://github.com/mongodb-js/mongosh", | ||
}, | ||
"gitHead": "5737e60cdbcd551f6a355b38fc9b5b6cc19ac5a4" | ||
"gitHead": "963c75bc45834b1bf69e62bf5b72c4ae8ef26cb4" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54905