Where can I find all error returns code of the NodeJS Firebase Admin SDK?

Viewed 440

I simply cannot find all error codes the NodeJS Admin SDK can return me when sending messages. For example with this code :

this.app
  .messaging()
  .sendToDevice(an_invalid_registration_token, message, {
    priority: 'high',
  })
  .then((response: MessagingDevicesResponse) => {
    console.log(response.results[0].error)
  })

It will output me this :

{
  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'
}

First, this output differs from what the 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 but the one I'm having in my example is note listed here. So is there another list somewhere else ?

Am I missing something or did I get something wrong ?

1 Answers
Related