[DOCS-12360] Include mention of exception-handling in mongo scripts Created: 14/Jan/19 Updated: 30/Oct/23 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | Server_Docs_20231030 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kelsey Schubert | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Days since reply: | 1 year, 14 weeks, 2 days ago | ||||||||
| Epic Link: | DOCSP-1769 | ||||||||
| Story Points: | 1 | ||||||||
| Description |
DescriptionI believe that we can extend the follow page to include mention of error handling in mongo shell scripts: https://docs.mongodb.com/manual/tutorial/write-scripts-for-the-mongo-shell/ Could we include mention of asserts, like assert.commandWorked()? And instruct folks on how to use them to ensure mongo shell returns with the expected status code? Available assert commands can be found here: https://github.com/mongodb/mongo/blob/r4.0.5/src/mongo/shell/assert.js Scope of changes
|
| Comments |
| Comment by Education Bot [ 31/Oct/22 ] |
|
Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you! |
| Comment by Ravind Kumar (Inactive) [ 15/Jan/19 ] |
|
We can try, though any input from engineers who have some guidance on best practices would be very much appreciated. |