当我尝试运行node src/emails/account.js时,这个问题在我的终端中显示,除此之外我还验证了单个发件人请求:
ResponseError: Forbidden
at Request._callback (node_modules/@sendgrid/client/src/classes/cl
ient.js:124:25)
at Request.self.callback (node_modules/request/request.js:185:22)
at Request.emit (events.js:321:20)
at Request.<anonymous> (node_modules/request/request.js:1154:10)
at Request.emit (events.js:321:20)
at IncomingMessage.<anonymous> (node_modules/request/request.js:10
76:12)
at Object.onceWrapper (events.js:427:28)
at IncomingMessage.emit (events.js:333:22)
at endReadableNT (_stream_readable.js:1201:12)
at processTicksAndRejections (internal/process/task_queues.js:84:2
1) {
code: 403,
message: 'Forbidden',
response: {
headers: {
server: 'nginx',
date: 'Sun, 12 Jul 2020 12:35:21 GMT',
'content-type': 'application/json',
'content-length': '281',
connection: 'close',
'access-control-allow-origin': 'https://sendgrid.api-docs.io',
'access-control-allow-methods': 'POST',
'access-control-allow-headers': 'Authorization, Content-Type, On
-behalf-of, x-sg-elas-acl',
'access-control-max-age': '600',
'x-no-cors-reason': 'https://sendgrid.com/docs/Classroom/Basics/
API/cors.html'
},
body: { errors: [Array] }
}
}