小编Amb*_*ude的帖子

node.js @sendgrid/mail 错误:未经授权

我想从我的应用程序(Angular)发送电子邮件。我尝试在 node.js 中使用 @sendgrid/mail,但它不起作用。

错误是:

(node:18224) UnhandledPromiseRejectionWarning: Error: Unauthorized
    at Request.http [as _callback] (C:\Users\Gauthier\tla\back\node_modules\@sendgrid\client\src\classes\client.js:124:25)
    at Request.self.callback (C:\Users\Gauthier\tla\back\node_modules\request\request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (C:\Users\Gauthier\tla\back\node_modules\request\request.js:1161:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (C:\Users\Gauthier\tla\back\node_modules\request\request.js:1083:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
(node:18224) 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(). (rejection id: 1)
(node:18224) [DEP0018] DeprecationWarning: Unhandled promise …
Run Code Online (Sandbox Code Playgroud)

email http node.js sendgrid angular

5
推荐指数
1
解决办法
3989
查看次数

标签 统计

angular ×1

email ×1

http ×1

node.js ×1

sendgrid ×1