[GODRIVER-569] Docs don't explain what operations can return BulkWriteError Created: 18/Sep/18  Updated: 18/Nov/19  Resolved: 18/Nov/19

Status: Closed
Project: Go Driver
Component/s: Documentation
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: David Golden Assignee: Divjot Arora (Inactive)
Resolution: Done Votes: 0
Labels: beta
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: Improve GoDoc

 Description   

From inspecting the code, it looks like InsertMany can return BulkWriteError, but this isn't apparent from docs. Because all errors are hidden behind the error interface, users need a hint about when they could usefully type switch on an error to check for BulkWriteError.



 Comments   
Comment by Divjot Arora (Inactive) [ 18/Nov/19 ]

Done as part of collection docs and we'll add more docs about error documentation when we improve error types.

Comment by David Golden [ 07/Jan/19 ]

A user might expect to receive a BulkWriteError from the BulkWrite method. But as no other write method has a matched-name error, they might assume that all other write errors are the WriteError or WriteErrors (?!?) type. Users should get more guidance on what types of errors different methods might return so they can write code to recover or log appropriately.

Comment by Ian Whalen (Inactive) [ 26/Nov/18 ]

bumping to 0.2.0 - not going to hold the beta1 release on this.

Comment by Kristofer Brandow (Inactive) [ 26/Nov/18 ]

david.golden Why should we explicitly call out BulkWriteError? We don't specify other types of errors the CRUD methods can return.

Generated at Thu Feb 08 08:34:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.