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

Handle 404 when fetching PDF + bump dependencies #4

Merged
merged 5 commits into from
Aug 17, 2023

Conversation

donaldgray
Copy link
Member

@donaldgray donaldgray commented Aug 17, 2023

Changes were originally to better handle errors. There were log entries about corrupt PDFs but it was due to 404's not being correctly handled so the resulting file was an HTML blob - fix was to add download_request.raise_for_status() and abort processing if encountered. As part of implementing + testing I bumped a few python dependencies.

Also resolved #2, but rather forking pdf-alto lib I added the generated binary to /deps folder. Originally a multi stage Docker build built this and copied it over but it took a long time. This change simplifies + speeds up the build at the cost of having a large binary in repo.

Resolved #3 too as part of update work, this pins the Localstack Dockerfile to a known version and uses latest init.d folder format.

@donaldgray donaldgray merged commit 52c92b2 into main Aug 17, 2023
1 check passed
@donaldgray donaldgray deleted the feature/handle_pdf_err branch August 17, 2023 12:59
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

Successfully merging this pull request may close these issues.

Pin localstack + update init.d Fork PdfAlto repository
2 participants