0

除了忽略 SSL 之外,处理这个问题的正确方法是什么?

(node:17698) UnhandledPromiseRejectionWarning: FetchError: request to https://api.notion.com/v1/pages failed, reason: unable to get local issuer certificate

    at ClientRequest.<anonymous> (/Users/jshingler/workspaces/notion_o365/node_modules/node-fetch/lib/index.js:1461:11)

    at ClientRequest.emit (events.js:400:28)

    at TLSSocket.socketErrorListener (_http_client.js:475:9)

    at TLSSocket.emit (events.js:400:28)

    at emitErrorNT (internal/streams/destroy.js:106:8)

    at emitErrorCloseNT (internal/streams/destroy.js:74:3)

    at processTicksAndRejections (internal/process/task_queues.js:82:21)

(Use `node --trace-warnings ...` to show where the warning was created)

(node:17698) 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:17698) [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.

不明确的

4

0 回答 0