Har*_*oom 3 node.js firebase firebase-cloud-messaging
我根本找不到 NodeJS Admin SDK 在发送消息时可以返回的所有错误代码。例如使用以下代码:
this.app
.messaging()
.sendToDevice(an_invalid_registration_token, message, {
priority: 'high',
})
.then((response: MessagingDevicesResponse) => {
console.log(response.results[0].error)
})
Run Code Online (Sandbox Code Playgroud)
它会输出我这个:
{
errorInfo: {
code: 'messaging/invalid-registration-token',
message: 'Invalid registration token provided. Make sure it matches the registration token the client app receives from registering with FCM.'
},
codePrefix: 'messaging'
}
Run Code Online (Sandbox Code Playgroud)
首先,此输出与文档描述的不同(我在这里自愿删除了堆栈),您可以看到codePrefix文档中未定义该属性。但我也无法掌握所有像这里出现的错误代码messaging/invalid-registration-token。我确实找到了所有这些错误代码,但我在示例中遇到的错误代码已在此处列出。那么其他地方还有另一个列表吗?
我错过了什么或者我做错了什么吗?
| 归档时间: |
|
| 查看次数: |
741 次 |
| 最近记录: |