在哪里可以找到 NodeJS Firebase Admin SDK 的所有错误 returns 代码?
Where can I find all error returns code of the NodeJS Firebase Admin SDK?
我根本找不到 NodeJS Admin SDK 在发送消息时可以 return 我找到的所有错误代码。例如使用此代码:
this.app
.messaging()
.sendToDevice(an_invalid_registration_token, message, {
priority: 'high',
})
.then((response: MessagingDevicesResponse) => {
console.log(response.results[0].error)
})
它会输出这个:
{
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'
}
首先,此输出与 documentation describes (I voluntarily removed the stack here) you can see the property codePrefix
is not defined in the documenation. But I also cannot put my hands on all the error code like the one appearing here messaging/invalid-registration-token
. I did find all these error codes 不同,但我在示例中使用的是此处列出的注释。那么在其他地方还有另一个列表吗?
我是漏掉了什么还是弄错了什么?
错误代码列表在 FCM documentation。
我根本找不到 NodeJS Admin SDK 在发送消息时可以 return 我找到的所有错误代码。例如使用此代码:
this.app
.messaging()
.sendToDevice(an_invalid_registration_token, message, {
priority: 'high',
})
.then((response: MessagingDevicesResponse) => {
console.log(response.results[0].error)
})
它会输出这个:
{
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'
}
首先,此输出与 documentation describes (I voluntarily removed the stack here) you can see the property codePrefix
is not defined in the documenation. But I also cannot put my hands on all the error code like the one appearing here messaging/invalid-registration-token
. I did find all these error codes 不同,但我在示例中使用的是此处列出的注释。那么在其他地方还有另一个列表吗?
我是漏掉了什么还是弄错了什么?
错误代码列表在 FCM documentation。