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

InvalidRange: The requested range is not satisfiable #155

Open
justinataviture opened this issue Oct 1, 2019 · 1 comment
Open

InvalidRange: The requested range is not satisfiable #155

justinataviture opened this issue Oct 1, 2019 · 1 comment

Comments

@justinataviture
Copy link

justinataviture commented Oct 1, 2019

When attempting to open a corrupted .zip file from AWS S3, an InvalidRange error is thrown that cannot be caught. This prevents code execution from terminating gracefully. I've tried

try { directory = await unzipper.Open.s3(s3, {Bucket: S3_BUCKET_NAME, Key: key}); } catch (error) { console.log(error); }
and
const directory = await unzipper.Open.s3(s3, {Bucket: S3_BUCKET_NAME, Key: key}).catch((error) => { console.log(error); });
and in neither case does the error flow through to the catch block. Instead, I get a stack dump InvalidRange: The requested range is not satisfiable at Request.extractError... and the process crashes.

@ZJONSSON
Copy link
Owner

ZJONSSON commented Oct 1, 2019

Very interesting, thanks for the report. This error should definitely be caught. Please do a PR if you figure this out, otherwise I will try to take a look later in the week

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

2 participants