Use ApiService to get error message
This commit is contained in:
parent
b5db41920f
commit
7c361c07f9
5 changed files with 8 additions and 4 deletions
|
@ -211,6 +211,7 @@ quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanServi
|
|||
|
||||
// Handle session expiration.
|
||||
Restangular.setErrorInterceptor(function(response) {
|
||||
//TODO: remove check for error_type (old style errors)
|
||||
var invalid_token = response.data['title'] == 'invalid_token' || response.data['error_type'] == 'invalid_token';
|
||||
if (response.status == 401 && invalid_token && response.data['session_required'] !== false) {
|
||||
$('#sessionexpiredModal').modal({});
|
||||
|
|
Reference in a new issue