This work investigates the error caused by non-uniformities along the line-of-sight in velocity measurement using tunable diode-laser absorption spectroscopy (TDLAS). Past work has demonstrated TDLAS as an attractive diagnostic technique for measuring velocity, which is inferred from the Doppler shift of two absorption features using two crossing laser beams. However, because TDLAS is line-of-sight in nature, the obtained velocity is a spatially-averaged value along the probing laser beams. As a result, non-uniformities in the flow can cause uncertainty in the velocity measurement. Therefore, it is the goal of this work to quantify the uncertainty caused by various non-uniformities typically encountered in practice, including boundary layer effects, the divergence/convergence of the flow, and the methods (direct absorption vs. wavelength modulation) used to fit the Doppler shift. Systematic analyses are performed to quantify the uncertainty under various conditions, and case studies are reported to illustrate the usefulness of such analysis in interpreting experimental data obtained from a scramjet facility. We expect this work to be valuable for the design and optimization of TDLAS-based velocimetry, and also for the quantitative interpretation of the measurements.