Do not retry and log warning when push notification was not authorized (#18562)

pull/18643/head
Rodrigo Nascimento 5 years ago committed by GitHub
parent e2e5322c7f
commit b913621b57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      app/push/server/push.js

@ -116,7 +116,7 @@ export class PushClass {
}
return HTTP.post(`${ gateway }/push/${ service }/send`, data, (error, response) => {
if (response && response.statusCode === 406) {
if (response?.statusCode === 406) {
logger.info('removing push token', token);
appTokensCollection.remove({
$or: [{
@ -128,6 +128,11 @@ export class PushClass {
return;
}
if (response?.statusCode === 401) {
logger.warn('Error sending push to gateway (not authorized)', response);
return;
}
if (!error) {
return;
}

Loading…
Cancel
Save