It will not cause failure or damage to the relay itself, but will affect the coil, resulting in the following conditions.
Single stabilizer relay: inactive.
Single-winding latching relay: reversed SET and RESET action
Double winding latching relay: depending on the type of relay used, it may cause malfunction or stop operation.
When using latching relays, some relays are configured in such a way that the contacts are in a reset state when a reverse polarity voltage is applied to the set coil. When a reverse polarity voltage is applied to the reset coil, the contacts are in the set state, but the relay cannot be used in this manner, regardless of the design.