Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try catch fails to catch errors #47

Open
Aiaminm opened this issue Jun 23, 2022 · 0 comments
Open

try catch fails to catch errors #47

Aiaminm opened this issue Jun 23, 2022 · 0 comments

Comments

@Aiaminm
Copy link

Aiaminm commented Jun 23, 2022

my code:
https://github.com/Aiaminm/fake123/blob/main/content/fleekupload.js

When some network error occurs, even using try catch error will cause the program to stop

`/workdir/node_modules/aws-sdk/lib/request.js:31
throw err;
^

Error [TypeError]: Cannot destructure property 'ETag' of 'data' as it is undefined.
at /workdir/node_modules/@fleekhq/fleek-storage-js/utils/stream-upload.js:17:13
at ManagedUpload.callback (/workdir/node_modules/s3-streaming-upload/src/index.js:70:7)
at ManagedUpload.cleanup (/workdir/node_modules/aws-sdk/lib/s3/managed_upload.js:635:10)
at Response. (/workdir/node_modules/aws-sdk/lib/s3/managed_upload.js:572:28)
at Request. (/workdir/node_modules/aws-sdk/lib/request.js:367:18)
at Request.callListeners (/workdir/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/workdir/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/workdir/node_modules/aws-sdk/lib/request.js:686:14)
at Request.transition (/workdir/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/workdir/node_modules/aws-sdk/lib/state_machine.js:14:12) {
code: 'TypeError',
time: 2022-06-23T13:06:11.242Z
}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant