@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
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Release Notes
4
4
 
5
+ ### v1.2.4
6
+
7
+ - Do not fail the extraction of attachments if streaming of single attachment fails.
8
+
5
9
  ### v1.2.3
6
10
 
7
11
  - Add `local` flag to use for local development of the ADaaS snap-ins.
@@ -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 ((response === null || response === void 0 ? void 0 : response.delay) || (response === null || response === void 0 ? void 0 : response.error)) {
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devrev/ts-adaas",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "DevRev ADaaS (AirDrop-as-a-Service) Typescript SDK.",
5
5
  "type": "commonjs",
6
6
  "main": "./dist/index.js",