The various codes I have read often discuss if a person makes an error when saying various parts of the Amidah (seasonal or holiday based changes or insertions) and birkat hamazon, but the Shulchan Aruch, O"C, 267:3 indicates that on Friday night, we change the text of the end of Hashkiveinu before the Amidah and it doesn't seem to say what one should do if he erroneously said the weekday text.
Do the commentaries (or other sources) indicate that one should repeat the blessing with the proper closing (or, if one catches himself within a certain time, simply say the proper ending), or whether repeating would be an interruption between the Sh'ma and the Amidah and the weekday text would be an acceptable alternative so one needs not resay anything?
I understand that there are possible variables (davening with a minyan or alone, and whether one is concerned about an interruption related).