Refactored error handling in RCC