Refactored name ResultCode to ErrorCode