If error becomes known after a prayer that followed sincere ijtihad, the prayer is not repeated.
If error becomes known during prayer, the worshipper turns and continues.
Both rulings presume proper prior inquiry. Deliberate disregard of known direction is a different issue.