Hello
I previously posted about running into issue with encountering an Unexpected error on URL when querying Prismic content in metalsmith?](Unexpected error on URL when querying Prismic content in metalsmith?)
I have upgraded our site and our handlebars helpers to use v2 of the api: prismic.io - API Browser.
I am now consistency seeing this error again and I'm not sure what is causing this.
Here's the error output:
[metalsmith-watch] ✓ Live reload server started on port: 3001
Error: Unexpected error on URL https://dronedeploy-www.cdn.prismic.io/api/v2/documents/search?q=%5B%5B%3Ad%20%3D%20any(document.type%2C%20%5B%22ebook%22%2C%22webinar%22%2C%22event%22%2C%22series%22%2C%22map%22%2C%22trial%22%2C%22solution%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%22event%22%2C%20%22series%22%2C%20%22map%22%2C%20%22trial%22%2C%20%22solution%22%2C%20%22story%22%2C%20%22event%22%5D)%5D%5D&page=11&access_token=XXXX&ref=YKLZIREAACIAcvcz
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:39197) UnhandledPromiseRejectionWarning: Error: Unexpected error on URL https://dronedeploy-www.cdn.prismic.io/api/v2/documents/search?q=%5B%5B%3Ad%20%3D%20any(document.type%2C%20%5B%22ebook%22%2C%22webinar%22%2C%22event%22%2C%22series%22%2C%22map%22%2C%22trial%22%2C%22solution%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%22event%22%2C%20%22series%22%2C%20%22map%22%2C%20%22trial%22%2C%20%22solution%22%2C%20%22story%22%2C%20%22event%22%5D)%5D%5D&page=11&access_token=XXXX&ref=YKLZIREAACIAcvcz
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:39197) 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:39197) [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.
Error: Unexpected error on URL https://dronedeploy-www.cdn.prismic.io/api/v2/documents/search?q=%5B%5B%3Ad%20%3D%20any(document.type%2C%20%5B%22blog_post%22%2C%22story%22%5D)%5D%5D&q=%5B%5B%3Ad%20%3D%20any(document.type%2C%20%5B%22blog_post%22%2C%20%22story%22%5D)%5D%5D&page=9&access_token=XXXX&ref=YKLZIREAACIAcvcz
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.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:39197) UnhandledPromiseRejectionWarning: Error: Unexpected error on URL https://dronedeploy-www.cdn.prismic.io/api/v2/documents/search?q=%5B%5B%3Ad%20%3D%20any(document.type%2C%20%5B%22blog_post%22%2C%22story%22%5D)%5D%5D&q=%5B%5B%3Ad%20%3D%20any(document.type%2C%20%5B%22blog_post%22%2C%20%22story%22%5D)%5D%5D&page=9&access_token=XXXX&ref=YKLZIREAACIAcvcz
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.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:39197) 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: 2)
Error: Unexpected error on URL https://dronedeploy-www.cdn.prismic.io/api/v2/documents/search?q=%5B%5B%3Ad%20%3D%20any(document.type%2C%20%5B%22ebook%22%2C%22webinar%22%2C%22event%22%2C%22series%22%2C%22map%22%2C%22trial%22%2C%22solution%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%22map%22%2C%20%22solution%22%2C%20%22story%22%5D)%5D%5D&page=11&access_token=XXXX&ref=YKLZIREAACIAcvcz
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.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:39197) UnhandledPromiseRejectionWarning: Error: Unexpected error on URL https://dronedeploy-www.cdn.prismic.io/api/v2/documents/search?q=%5B%5B%3Ad%20%3D%20any(document.type%2C%20%5B%22ebook%22%2C%22webinar%22%2C%22event%22%2C%22series%22%2C%22map%22%2C%22trial%22%2C%22solution%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%22map%22%2C%20%22solution%22%2C%20%22story%22%5D)%5D%5D&page=11&access_token=XXXX&ref=YKLZIREAACIAcvcz
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.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:39197) 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: 3)
/Users/nikibrown/Code/landing_page/node_modules/metalsmith-prismic-server/src/dev-server.js:29
throw err;
^
Error: Unexpected error on URL https://dronedeploy-www.cdn.prismic.io/api/v2/documents/search?q=%5B%5B%3Ad%20%3D%20any(document.type%2C%20%5B%22ebook%22%2C%22webinar%22%2C%22event%22%2C%22series%22%2C%22map%22%2C%22trial%22%2C%22solution%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%22event%22%2C%20%22series%22%2C%20%22map%22%2C%20%22trial%22%2C%20%22solution%22%2C%20%22story%22%2C%20%22event%22%5D)%5D%5D&page=11&access_token=XXXX&ref=YKLZIREAACIAcvcz
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)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! DroneDeploy@1.0.0 dev: `node metalsmith.js dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the DroneDeploy@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/nikibrown/.npm/_logs/2021-05-17T21_11_56_903Z-debug.log
Any help is greatly appreciated.
Thanks,
Niki Brown