Quantum error correction in a solid-state hybrid spin register