Skip to content

EOF error when fetching documents with broken links #98

@stephenkao

Description

@stephenkao

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions