SYMPTOM:
Get "Object with ID "XXXX" and type 4 (Metric) is not found in metadata. It may have been deleted" error when migrating folders in Object Manager, as shown below:

This metadata inconsistency error cannot be captured if migrating the objects in that folder instead of the whole folder.
CAUSE:
Possible cause is one of the metrics are deleted from the object definition tables but the relationship between this metric and folder is still in the object dependency table for some reason. The Object Manager tries to migrate this in-existent metric when migrating the folder and thus the error appears.
ACTION: