refactored error handling in subscription #30