Skip to content

Commit b6b843d

Browse files
Do not fail the extraction if streaming of the single attachment fails (#28)
1 parent 37309f5 commit b6b843d

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Release Notes
44

5+
### v1.2.4
6+
7+
- Do not fail the extraction of attachments if streaming of single attachment fails.
8+
59
### v1.2.3
610

711
- Add `local` flag to use for local development of the ADaaS snap-ins.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devrev/ts-adaas",
3-
"version": "1.2.3",
3+
"version": "1.2.4",
44
"description": "DevRev ADaaS (AirDrop-as-a-Service) Typescript SDK.",
55
"type": "commonjs",
66
"main": "./dist/index.js",

src/http/axios-devrev-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ axiosRetry(axiosDevRevClient, {
77
retries: 5,
88
retryDelay: (retryCount, error) => {
99
console.warn(
10-
'Retry attempt: ' + retryCount + 'to url: ' + error.config?.url + '.'
10+
'Retry attempt: ' + retryCount + ' to url: ' + error.config?.url + '.'
1111
);
1212
if (error.response) {
1313
const retry_after = error.response?.headers['retry-after'];

src/workers/worker-adapter.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,8 +853,13 @@ export class WorkerAdapter<ConnectorState> {
853853

854854
for (const attachment of attachmentsToProcess) {
855855
const response = await this.processAttachment(attachment, stream);
856-
if (response?.delay || response?.error) {
856+
857+
if (response?.delay) {
857858
return response;
859+
} else if (response?.error) {
860+
console.warn(
861+
`Skipping attachment with ID ${attachment.id} due to error.`
862+
);
858863
}
859864

860865
if (this.state.toDevRev) {

0 commit comments

Comments
 (0)