If both Mirror Image and Sanctuary are on the same creature, do I determine if a duplicates is hit before or after the effects of sanctuary happen?
Mirror Image says:
Each time a creature targets you with an attack during the spell's duration, roll a d20 to determine whether the attack instead targets one of your duplicates.
Whereas the relevant text from Sanctuary is:
Until the spell ends, any creature who targets the warded creature with an attack or a harmful spell must first make a Wisdom saving throw.
Which effect takes place first, if they are attacked? If sanctuary takes precedence (or the creature passes it's wisdom saving throw), and the attack goes through, does it need a second save to target the duplicate? If mirror image takes precedence, does sanctuary still try to prevent the attack?