pub - errcode, success change to int