Why, no.
If we were operating in a war zone (i.e. close enough to the action for SAMs to get to us) then we assume the risk of taking a hit.
I am unaware of any international agreements for a party in a conflict to telegraph their punches to anyone.
Hague Regulations, dating back to the 1800s. However they make exception for surprise attacks.
Also mot sure if Israel ever signed on.
I’ll try to check for the both of our edification.
I’m pretty sure I read some time ago that we (USA) gave Russia notice we were going to bomb somewhere (Syria I think) and we didn’t want to have allies or neutral parties part of the collateral damage.
I think it is at least an accepted courtesy to warn those you do not want to be in harms way, for whatever reason.