Hello!
I inherited a site built in metalsmith (a static site generator) that uses prismic for content management. I'm running into an intermittent error when I run our build command that seems to be query/timeout related. Looks like the error has something to do with node_modules/prismic.io/lib/requests.js and node_modules/metalsmith-prismic-server/src/dev-server.js
Not quite sure what to do next in terms of troubleshooting as this error happened occasionally at first and is now happening 75% of the time when I run things locally. Any help would be greatly appreciated.
Error message below:
Error: Unexpected error on URL https://dronedeploy-www.cdn.prismic.io/api/v1/documents/search?q=%5B%5B%3Ad%20%3D%20any(document.type%2C%20%5B%22webinar%22%2C%22ebook%22%2C%22series%22%2C%22event%22%2C%22story%22%5D)%5D%5D&q=%5B%5B%3Ad%20%3D%20any(document.type%2C%20%5B%22ebook%22%2C%20%22webinar%22%2C%20%22series%22%2C%20%22story%22%5D)%5D%5D&page=6&access_token=XXXX&ref=XxjShBIAACEA0b2U
at ClientRequest.<anonymous> (/Users/nikibrown/Code/landing_page/node_modules/prismic.io/lib/requests.js:199:18)
at ClientRequest.emit (events.js:315:20)
at TLSSocket.socketOnEnd (_http_client.js:453:9)
at TLSSocket.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1221:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:98992) UnhandledPromiseRejectionWarning: Error: Unexpected error on URL https://dronedeploy-www.cdn.prismic.io/api/v1/documents/search?q=%5B%5B%3Ad%20%3D%20any(document.type%2C%20%5B%22webinar%22%2C%22ebook%22%2C%22series%22%2C%22event%22%2C%22story%22%5D)%5D%5D&q=%5B%5B%3Ad%20%3D%20any(document.type%2C%20%5B%22ebook%22%2C%20%22webinar%22%2C%20%22series%22%2C%20%22story%22%5D)%5D%5D&page=6&access_token=XXXX&ref=XxjShBIAACEA0b2U
at ClientRequest.<anonymous> (/Users/nikibrown/Code/landing_page/node_modules/prismic.io/lib/requests.js:199:18)
at ClientRequest.emit (events.js:315:20)
at TLSSocket.socketOnEnd (_http_client.js:453:9)
at TLSSocket.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1221:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:98992) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:98992) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
/Users/nikibrown/Code/landing_page/node_modules/metalsmith-prismic-server/src/dev-server.js:29
throw err;
^
Thanks!
- N