fixed #24: memory consuming
now when get apiError, will attempt to reperat last action 3 times