returnnil,status.Errorf(codes.Unauthenticated,"user not authenticated")
returnnil,status.Errorf(codes.Unauthenticated,"user not authenticated")
}
}
// Use custom memo_id if provided, otherwise generate a new UUID
memoUID:=strings.TrimSpace(request.MemoId)
ifmemoUID==""{
memoUID=shortuuid.New()
}elseif!base.UIDMatcher.MatchString(memoUID){
// Validate custom memo ID format
returnnil,status.Errorf(codes.InvalidArgument,"invalid memo_id format: must be 1-32 characters, alphanumeric and hyphens only, cannot start or end with hyphen")