From 0515d1feada842545075bb197cb20ddaefc5cd58 Mon Sep 17 00:00:00 2001 From: Brian Chen Date: Wed, 26 May 2021 14:19:11 -0500 Subject: [PATCH] docs: update BulkWriterError documentation (#1518) --- dev/src/index.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/dev/src/index.ts b/dev/src/index.ts index 6088be6f6..b97969d5e 100644 --- a/dev/src/index.ts +++ b/dev/src/index.ts @@ -229,7 +229,7 @@ const MAX_CONCURRENT_REQUESTS_PER_CLIENT = 100; * [update()]{@link DocumentReference#update} and * [delete()]{@link DocumentReference#delete} calls in * [DocumentReference]{@link DocumentReference}, - * [WriteBatch]{@link WriteBatch}, [BulkWriter]({@link BulkWriter}, and + * [WriteBatch]{@link WriteBatch}, [BulkWriter]{@link BulkWriter}, and * [Transaction]{@link Transaction}. Using Preconditions, these calls * can be restricted to only apply to documents that match the specified * conditions. @@ -305,6 +305,23 @@ const MAX_CONCURRENT_REQUESTS_PER_CLIENT = 100; * @typedef {Object} BulkWriterOptions */ +/** + * An error thrown when a BulkWriter operation fails. + * + * The error used by {@link BulkWriter~shouldRetryCallback} set in + * {@link BulkWriter#onWriteError}. + * + * @property {GrpcStatus} code The status code of the error. + * @property {string} message The error message of the error. + * @property {DocumentReference} documentRef The document reference the operation was + * performed on. + * @property {'create' | 'set' | 'update' | 'delete'} operationType The type + * of operation performed. + * @property {number} failedAttempts How many times this operation has been + * attempted unsuccessfully. + * @typedef {Error} BulkWriterError + */ + /** * Status codes returned by GRPC operations. *