Quantum error-correcting codes are constructed that embed a finite-dimensional codespace in the infinite-dimensional Hilbert state space of the rotational degrees of freedom of a rigid body. Such codes allow for protection against diffusion in the body's orientation as well as small kicks in the body's angular momentum. We mention realizations of the logical states of such codes in molecules, atomic ensembles, and nanoparticles. Such states are part of a "partially Fourier-transformed" basis that interpolates between the position and momentum bases of the system. The idea of using elements of such a basis for error correction turns out to be generally relevant, allowing for a unified treatment of our rigid body codes, qudit Calderbank-Shor-Steane codes, and oscillator Gottesman- Kitaev-Preskill codes.