Tablestore SDK for Node.js handles errors as exceptions. This topic describes the error handling methods, exceptions, and retry policies of Tablestore SDK for Node.js.
Methods
Tablestore SDK for Node.js handles errors as exceptions. If no exceptions are returned, the operation is successful. If an exception is returned, the operation fails.
Batch operations such as BatchGetRow and BatchWriteRow are successful only if the system verifies that no exception is returned and the status of each row is successful.
Exceptions
All errors are handled by Tablestore SDK for Node.js in a unified manner, and are returned as the value of the err parameter by using the callback method. Before you obtain the returned data, you must check whether the err parameter has a value.
If an error occurred at the server side, requestId is returned for the err parameter. requestId indicates the UUID that is used to identify the request. If the issue persists, record the value of the requestId parameter and submit a ticket.
Retries
Tablestore SDK for Node.js automatically retries operations when an error occurs. In the default retry policy, the maximum number of retry attempts is 20, and the maximum retry interval is 3,000 milliseconds. Retries are performed for throttling errors and internal server errors related to read operations. For more information, see tablestore/lib/retry.