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

EOF error when fetching documents with broken links #98

Open
stephenkao opened this issue Sep 3, 2020 · 1 comment
Open

EOF error when fetching documents with broken links #98

stephenkao opened this issue Sep 3, 2020 · 1 comment

Comments

@stephenkao
Copy link

Hey, everyone!

My team uses the following code to fetch all documents in our Prismic repository:

client = Prismic.api('https://<my_repo_host>/api')
response = client.all({ 'page' => current_page, 'pageSize' => 100 })

This worked well us until we started getting EOF errors from the client.all call. After a little bit of digging around, I discovered that it was caused by a broken link in a single document:

image

For context, this was a Content Relationship field linking to a now-archived internal document.

Would it be possible to update this Gem to handle this a little more gracefully, like maybe adding a nested error field for the offending document or even just returning nil for its body? The alternative solution that we have is just querying documents one by one and skipping the document when we run into the EOFError, which is possible but not preferable.

Thanks in advance! I'm also happy to add more details if needed.

@MarcMcIntosh
Copy link
Contributor

Hi @stephenkao, could you write a test that recreates this issue?

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