Perhaps you are too trusting?
As far as I am aware there is no law that would have compelled the AFP to give a heads up to the Indonesians. If there was an international convention of some sort then who gives a crap. Countries lie and keep secrets to avoid so called international 'obligations' and appease their own population all the time. I'm guessing it's a case of the AFP at the time not having robust enough governance and oversight - a lack of checks and balances to ensure that in their quest to do the mission they weren't so focused that they were blind to the fact they were ****ing up majorly on a humanitarian level. IMO there is no excuse for putting Australian citizens in a situation where they might face the death penalty.