Unified error handling