title: APN Status '400,' How can I get more data about error?
body: <p>I'm using node-apn to send push notifications to my device. Whenever I try, I get the following: </p>
  
  <pre><code>    { sent: [],
      failed: 
     [ { device: '****',
     status: '400',
     response: [Object] } ] }
  </code></pre>
  
  <p>I'm fairly certain my device token is correct. Is there any way to find out more info about why this error occurs. Is there info in the "response"—if so how do I get it? It would be helpful to get one of the error strings listed here (<a href="https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html" rel="nofollow noreferrer">https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html</a>) like "BadCollapseId"  </p>
  
  <p>Here is my node.js code for reference. </p>
  
  <pre><code>           var deviceToken = "***";
              var notification = new apn.Notification();
              notification.topic = '*****';
              notification.alert = "HI DER";
              notification.payload = {id: 3};
              apnProvider.send(notification, deviceToken).then(function(result) {  
                  console.log(result);
  
              });
  </code></pre>
  
  <p>The app is built using ionic 2, but I don't think that would make a difference. </p>
  
  <p>Thanks!</p>