- Strapi Version: 3.0.2
- Operating System: Mac os x Catalina 10.15.5
- Database: sql
- Node Version: 10.18
- NPM Version: —
- Yarn Version: 1.22.10
Hi! I have an unique field in a content type and when i upload/post dublicate data it returns an 500 error as expected. For simplictity say that I have an array containing 10 elements and 8 of them already exists in the database/cms.
When i’m loopoing over this array and upload the single elements one at a time the whole requests fails as there is duplicates based on the unique contrain/flag in the cms and thus not uploading the “missing” elements. Is there a built in way to continue the upload so that the two missing elements is uploaded or handle this case? Or do I have to solve this on my end? And how would i go about this? I problably could fetch all the uniqeu names from the cms first and check if exists and if so dont upload this parcicular element? Or does anyone have another suggestion?