Rename error as errorcode in parameter