isServerThrottlingException: function()

in lib/retry/retry_util.js [65:80]


    isServerThrottlingException: function (exception) {
        var errorCode = exception.code
        var errorMessage = exception.message

        if (errorCode == "OTSServerBusy" ||
            errorCode == "OTSNotEnoughCapacityUnit" ||
            errorCode == "OTSOperationThrottled") {
            return true;
        }

        if (errorCode == "OTSQuotaExhausted" && errorMessage == "Too frequent table operations.") {
            return true;
        }

        return false;
    }