We're updating the issue view to help you get more done. 

Better error message for create Link object

Description

prototype code:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 makeLink <- function(fileId, parentId, linkName = NULL, annotations = list()) { # Get synapse properties of the source object obj = synapseClient::synGet(fileId, downloadFile=F) if (is.null(linkName)) { linkName = obj@properties$name } # Create a linksTo list linksTo = list( targetVersionNumber = obj@properties$versionNumber, targetId = obj@properties$id ) #Create a linkClass list linkClass = list(concreteType='org.sagebionetworks.repo.model.Link', linksTo = linksTo, entityType = 'org.sagebionetworks.repo.model.Link', parentId = parentId, name = linkName, annotations = annotations, linksToClassName = 'org.sagebionetworks.repo.model.FileEntity') foo <- synapseClient::synRestPOST('/entity',linkClass) }

https://github.com/Sage-Bionetworks/rSynapseUtilities/blob/dev/R/makeLink.R

Environment

Status

Assignee

Kimyen Truong

Reporter

Ben Logsdon

Labels

Validator

Ziming Dong

Fix versions

Priority

Major