I am uploading a file and some metadata into Sharepoint. This is working fine most of the times.
However when there is some problem with the metadata data types I get an error that metadata can be set only for a Drive Item. However an entry is created in SP just with the file and the Metadata columns are empty. This is creating issues in SharePoint as some metadata fields are required fields.
Is there anyway to stop the file from getting uploaded in the metadata fails.