video-maker icon indicating copy to clipboard operation
video-maker copied to clipboard

erro (node:5780) UnhandledPromiseRejectionWarning: Error: Unauthorized: Access is denied due to invalid credentials.

Open downbios opened this issue 4 years ago • 1 comments

Segue o erro abaixo:

(node:5780) UnhandledPromiseRejectionWarning: Error: Unauthorized: Access is denied due to invalid credentials. at Request._callback (C:\Users\DOWNBIOS\Desktop\PROJETO\video-maker\node_modules\ibm-cloud-sdk-core\lib\requestwrapper.js:102:21) at Request.self.callback (C:\Users\DOWNBIOS\Desktop\PROJETO\video-maker\node_modules\request\request.js:185:22) at Request.emit (events.js:315:20) at Request. (C:\Users\DOWNBIOS\Desktop\PROJETO\video-maker\node_modules\request\request.js:1157:10) at Request.emit (events.js:315:20) at IncomingMessage. (C:\Users\DOWNBIOS\Desktop\PROJETO\video-maker\node_modules\request\request.js:1079:12) at Object.onceWrapper (events.js:421:28) at IncomingMessage.emit (events.js:327:22) at endReadableNT (stream_readable.js:1220:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) (node:5780) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promis e 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:5780) [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-zer o exit code.

alguém sabe me dizer como resolver?

downbios avatar Aug 12 '20 18:08 downbios

you need to replace the URL in robots/text.js with your IBM credential URL

const watsonUrl = require('../credentials/watson-nlu.json').url

const nlu = new NaturalLanguageUnderstandingV1({
  iam_apikey: watsonApiKey,
  version: '2019-07-12',
  url: watsonUrl
})

strongSoda avatar Sep 02 '20 09:09 strongSoda