FAILED SQL: INSERT INTO \"brand\" (\"brand_id\", \"name\", \"notification_email\", \"notification_phone\", \"created_at\", \"updated_at\") VALUES (%(0)s, %(1)s, %(2)s, %(3)s, %(4)s, %(5)s)\nPymongo error: {\'index\': 0, \'code\': 11000, \'errmsg\': \'E11000 duplicate key error collection: f2fretaildev.brand index: name_1 dup key: { : \"shyamalas\" }\'}\nVersion: 1.2.26"
This is the error on duplicate key while adding data with djongo (django mongodb orm)
Is there a way get the pymongo error inside it as a json? I tried json.dumps and json.loads which did not work