v3: misc fixes

This commit is contained in:
Matteo Pagliazzi
2016-05-18 12:16:31 +02:00
parent d888fc7588
commit 210ac57165
5 changed files with 12 additions and 9 deletions

View File

@@ -40,6 +40,9 @@ angular.module('habitrpg')
} else {
$rootScope.$broadcast('responseError', response.data.message);
}
if ($rootScope.User && $rootScope.User.sync) $rootScope.User.sync();
// Need to reject the prompse so the error is handled correctly
if (response.status === 401) {
return $q.reject(response);