refactored and added custom error handling for base template and schedule view