Fix error handling in CA initialization