(a) Abd al-Rahman bin Abi al-Zinad (may Allah have mercy on him) narrates from his father that the jurists of Madinah used to say: Whoever prays without ablution, or facing other than the qiblah, must repeat the prayer, whether within the time or after the time has passed, unless his error regarding the qiblah is a slight deviation or something minor, in which case there is leeway.
(b) It is reported from Ibrahim al-Nakha'i (may Allah have mercy on him) that he said, concerning one who prays facing other than the qiblah, that he does not repeat the prayer.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2248