I am using the $http interceptor to log all server messages on growl. In one random tests, we had CORS disabled on the server so there was no response sent all which resulted in growl throwing an exception.
I traced it to this line 160 in growlFactory.js
this.serverMessagesInterceptor = ['$q', 'growl', function ($q, growl) {
function checkResponse (response) {
if (response !== undefined && response.data[_messagesKey] && response.data[_messagesKey].length > 0) {
growl.addServerMessages(response.data[_messagesKey]);
}
}
return {
'response': function (response) {
checkResponse(response);
return response;
},
'responseError': function (rejection) {
checkResponse(rejection);
return $q.reject(rejection);
}
};
}];
In the if conditions if you add another condition to check response.data not null, it can solve this.
I know this is a special case (CORS disabled) but it would be nice to have the plugin addressing all possible scenarios. Looking forward for an update on this.
I am using the $http interceptor to log all server messages on growl. In one random tests, we had CORS disabled on the server so there was no response sent all which resulted in growl throwing an exception.
I traced it to this line 160 in growlFactory.js
In the if conditions if you add another condition to check response.data not null, it can solve this.
I know this is a special case (CORS disabled) but it would be nice to have the plugin addressing all possible scenarios. Looking forward for an update on this.
Thanks for all your work done on growl-v2!