Cloned items deleted if _ItemCreateException occurs, any way to ignore errors?

482
2
05-05-2022 07:28 PM
ShawnBeltz
New Contributor

When cloning from AGOL to Portal as a user, I sometimes encounter errors that cause the whole clone operation to revert, and all cloned items are deleted.  As a user (not administrator) it is not always possible to correct these errors, but there is still value in having a development/backup copy of as many items as possible.  Is there a way to ignore errors during cloning, and keep the cloned items?

Example: I don't have access to create a Feature Tracking service on our Portal, so when I clone my content I get this error:

_ItemCreateException: ('Failed to create Feature Service Location Tracking: Location tracking service schema cannot be modified.\n(Error Code: 500)', Item title:"location_tracking_0755" type:Feature Layer Collection owner:me@MYDOMAIN)

and then all the items that had been cloning over get removed at the destination.

Thanks!

 

 

0 Kudos
2 Replies
ShawnBeltz
New Contributor

FYI, solved this by modifying the cloning and exception handling code that ships with ArcGIS Pro. 

0 Kudos
sworkmanhs
New Contributor II

Would you mind sharing how you modified the code? I'm running into the same situation. Thanks in advanced.

0 Kudos