log api errors