Forum Discussion
GianlucaSB
Mar 12, 2025Brass Contributor
DeleteBlobLogicApp on malware blob upload
Dear All, I start by saying that I don't know whether this matter (and issue for me) was already raised here or somewhere else, I couldn't find anything relevant to me. I have deployed the DeleteBl...
Kidd_Ip
Mar 13, 2025MVP
Please consider the following:
- Check the Output of GetBlobEntity:
- The error indicates that the array returned by GetBlobEntity is empty. This could mean that the query isn't fetching any blobs. Double-check the logic in your Query action to ensure it's correctly identifying blobs.
- Add a Condition to Handle Empty Arrays:
- Before the Delete Blob action, add a condition to check if the output of GetBlobEntity contains any items. If the array is empty, you can skip the Delete Blob action to avoid errors.
- Modify the Delete Blob Action:
- Update the uri property in the Delete Blob action to handle cases where the array might be empty:
"uri": "@{if(empty(body('GetBlobEntity')), null, body('GetBlobEntity')[0].Url)}"
-
- This ensures that the uri is only set if the array is not empty.