@devrev/ts-adaas 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ exports.axiosDevRevClient = axiosDevRevClient;
|
|
|
13
13
|
retries: 5,
|
|
14
14
|
retryDelay: (retryCount, error) => {
|
|
15
15
|
var _a, _b;
|
|
16
|
-
console.warn('Retry attempt: ' + retryCount + 'to url: ' + ((_a = error.config) === null || _a === void 0 ? void 0 : _a.url) + '.');
|
|
16
|
+
console.warn('Retry attempt: ' + retryCount + ' to url: ' + ((_a = error.config) === null || _a === void 0 ? void 0 : _a.url) + '.');
|
|
17
17
|
if (error.response) {
|
|
18
18
|
const retry_after = (_b = error.response) === null || _b === void 0 ? void 0 : _b.headers['retry-after'];
|
|
19
19
|
if (retry_after) {
|
|
@@ -619,9 +619,12 @@ class WorkerAdapter {
|
|
|
619
619
|
const attachmentsToProcess = attachments.slice((_c = (_b = this.state.toDevRev) === null || _b === void 0 ? void 0 : _b.attachmentsMetadata) === null || _c === void 0 ? void 0 : _c.lastProcessed, attachments.length);
|
|
620
620
|
for (const attachment of attachmentsToProcess) {
|
|
621
621
|
const response = await this.processAttachment(attachment, stream);
|
|
622
|
-
if (
|
|
622
|
+
if (response === null || response === void 0 ? void 0 : response.delay) {
|
|
623
623
|
return response;
|
|
624
624
|
}
|
|
625
|
+
else if (response === null || response === void 0 ? void 0 : response.error) {
|
|
626
|
+
console.warn(`Skipping attachment with ID ${attachment.id} due to error.`);
|
|
627
|
+
}
|
|
625
628
|
if (this.state.toDevRev) {
|
|
626
629
|
this.state.toDevRev.attachmentsMetadata.lastProcessed += 1;
|
|
627
630
|
}
|