我今天已成功发送了一系列电子邮件与Sendgrid。这是大量的电子邮件(大量用户创建,每封成功创建的电子邮件都附有电子邮件)。一切顺利,收到了电子邮件。但是,大多数电子邮件都是假的,仅用于测试目的(例如a@example.com)。但通常至少有一封真实的电子邮件可以看到他们实际发送的内容。
过了一会儿,我开始收到以下错误,无论何时发送任何电子邮件都会导致服务器崩溃。我检查了SendGrid文档,但它只告诉你不同的错误代码是什么意思。我没有收到错误代码,这就是为什么我把它带到stackoverflow。
/home/me/websites/emailtester/node_modules/@sendgrid/helpers/classes/response-error.js:45
[0] if (Array.isArray(body.errors)) {
[0] ^
[0]
[0] TypeError: Cannot read property 'errors' of undefined
[0] at ResponseError.toString (/home/me/websites/emailtester/node_modules/@sendgrid/helpers/classes/response-error.js:45:27)
[0] at Function.prepareStackTrace (/home/me/websites/emailtester/node_modules/source-map-support/source-map-support.js:377:16)
[0] at new ResponseError (/home/me/websites/emailtester/node_modules/@sendgrid/helpers/classes/response-error.js:30:14)
[0] at Request.http [as _callback] (/home/me/websites/emailtester/node_modules/@sendgrid/client/src/client.js:124:25)
[0] at Request.self.callback (/home/me/websites/emailtester/node_modules/request/request.js:186:22)
[0] at emitTwo (events.js:125:13)
[0] at Request.emit (events.js:213:7)
[0] at Request.<anonymous> (/home/me/websites/emailtester/node_modules/request/request.js:1163:10)
[0] at emitOne (events.js:115:13)
[0] at Request.emit (events.js:210:7)
[0] at IncomingMessage.<anonymous> (/home/me/websites/emailtester/node_modules/request/request.js:1085:12)
[0] at Object.onceWrapper (events.js:314:30)
[0] at emitNone (events.js:110:20)
[0] at IncomingMessage.emit (events.js:207:7)
[0] at endReadableNT (_stream_readable.js:1045:12)
[0] at _combinedTickCallback (internal/process/next_tick.js:138:11)
[0] at process._tickDomainCallback (internal/process/next_tick.js:218:9)
[0] [nodemon] app crashed - waiting for file changes before starting...
有没有其他人遇到此错误?这是我的代码的问题还是与SendGrid本身有关的东西?
答案 0 :(得分:0)
我没有做任何事情,但它现在有效。
周末我再次尝试了,电子邮件不会发送,但今天,电子邮件按预期发送。
我想知道这是不是sendgrid本身的一个错误,因为问题看起来像它出现时一样神秘。