Pass exc_info to logger when handling API errors (bug 870826)