Is there a way on how to cancel doctype after being saved through API. Let’s say I have apps in localhost:8000 and another in localhost:8001. I tried to create a doctype in 8001 through API in 8000. After getting response from 8001, I changed somethings in 8000 and it failed or getting error. the doctype is already being saved in 8001 but the transaction failed. Is there a way to cancel the doctype in 8001 automatically or should I cancel it though api too.
I see some frappe.db.rollback but I dont know if this would work nor how to use it properly.