Electron storage ring insertion devices, especially undulators, are designed using ideal device theory and the resulting x-ray spectra are reasonably close to predictions in most cases. However, magnetic field errors result in nonideal x-ray spectra. These effects can be calculated theoretically, and may also be measured. Here we present a study of an undulator whose magnetic fields and x-ray spectra have been measured carefully. We compare experiment and theory and explain the deviation from ideal of the shape of the undulator's spectral peaks in terms of magnet errors.