invoice: log gateway errors