Add deprecated support for error handling