MongoDB.CursorErrorDocument
---------------------------

Checks to see if an error has occurred while iterating the cursor.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [MongoDB](component_MongoDB.md) | [12.4](newinversion124.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "MongoDB.CursorErrorDocument"; MongoDBRef ) 

**MBS**( **"MongoDB.CursorErrorDocument";** /\* Checks to see if an error has occurred while iterating the cursor. \*/  
**$MongoDBRef**) /\* The reference number for the mongo connection.e.g. $MongoDB \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| MongoDBRef | The reference number for the mongo connection. | $MongoDB |

### Result

Returns empty result, JSON or error.

### Description

Checks to see if an error has occurred while iterating the cursor.  
If an error occurred server-side, the result is set to the server’s reply document with information about the error.  
### See also

- [MongoDB.ChangeStreamErrorDocument](MongoDBChangeStreamErrorDocument.md)

### Release notes

- **Version 12.4**
    - Added [MongoDB.CursorErrorDocument](https://www.mbsplugins.eu/MongoDBCursorErrorDocument.shtml) and [MongoDB.NewCursorFromCommandReply](https://www.mbsplugins.eu/MongoDBNewCursorFromCommandReply.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin 12.4](https://www.mbsplugins.de/archive/2022-09-27/MBS_FileMaker_Plugin_124/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.4pr1](https://www.mbsplugins.de/archive/2022-08-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 17th July 2022 , last changed 17th July 2022

  
[MongoDB.CursorCurrent](MongoDBCursorCurrent.md) - [MongoDB.CursorGetMaxAwaitTimeMS](MongoDBCursorGetMaxAwaitTimeMS.md)

[HTML Version](MongoDBCursorErrorDocument.shtml)