Distinguish between not yet registered and invalid appstore token

This is to avoid throwing errors
This commit is contained in:
Johannes Zellner
2019-05-06 11:07:19 +02:00
parent a59aca10ec
commit 83e2bd6ade
2 changed files with 2 additions and 1 deletions

View File

@@ -84,6 +84,7 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
// NOTE: this function is exported and called from the settings.js
$scope.updateSubscriptionStatus = function () {
Client.getSubscription(function (error, subscription) {
if (error && error.statusCode === 412) return; // ignore if not yet registered
if (error) console.error(error);
$scope.subscription = subscription;