error handling for widget render