Thank you for contacting us, I guess this issue is related to the way you are accessing Prismic content.
As you know Gatsby is a static website generator, and when building your website using gatsby-source-prismic plugin; your Gatsby project fetches your content from Prismic.
And if you don’t have a content available in your Prismic repository then your application breaks.
Here is an full exmaple of how to retrieve image link with Gatsby with the right validation, please notice the usage of if (!prismicContent) return null
Please let us know if that doesn’t answer your question,