Joebeurg
Joebeurg2w ago

Go SDK Methods Rollback

Hi, I am exploring self-hosted Zitadel with Go SDK and PSQL, and have a concern if the SDK has rollback In case of error? Additionally as an example is it possible to rollback an organisation/user creation via the SDK if an error happened inside a complex function that also calls the Zitadel methods?
9 Replies
Ask Inkeep
Ask Inkeep6d ago
Hi @Joebeurg, I'm an AI assistant for ZITADEL. While a team member reviews this question, I'll see if I can find relevant sources for your question. Answer I wasn't able to find a direct answer about rollback functionality in the Go SDK, here are some relevant sources: 1. Zitadel Seflhosted getting error {'error': 'unauthorized_client', 'error_description': 'JWT assertion failed'} : This discusses a specific authentication error in self-hosted ZITADEL but doesn't cover SDK rollback functionality. I'd suggest clicking the "Ask for help" button to tag a team member who can provide specific information about transaction rollback capabilities in the Go SDK. Feel free to tag @Ask Inkeep with additional questions. Got it. Tagging @Rajat for additional help. Got it. Tagging @Rajat for additional help. Got it. Tagging @Rajat for additional help.
Rajat
Rajat6d ago
hey @Joebeurg thanks for your question, I will look into this and will get back to you hey @Joebeurg short answer is no, it does not provide rollback acrosss multiple API calls. If an error occurs during an operation (creating an org/user), you should manually handle rollbcaks by writing the logic (delete the org if user creation fails). zitadel is event-sourced, so state changes are persisted as events,unlike “roll back” like a SQL txn. You can checkout this discussion for some rollback strategies in pgsql tho, this may give you some more ideas.
Joebeurg
JoebeurgOP6d ago
Thanks for taking time and providing an answer, that's what I thought, basically creating logic for rollbacks
Ask Inkeep
Ask Inkeep6d ago
Glad I could be helpful. Feel free to create a new thread with any new questions you may have.
Gigi the Giraffe (Zitadel)
@Joebeurg, you cannot mark your own questions as solved.
Rajat
Rajat5d ago
hey @Joebeurg you can mark my answer with ✅ and it will auto close this thread 🙂
Joebeurg
JoebeurgOP5d ago
I am trying but i have mistakenly marked the AI's 🤦‍♂️
Rajat
Rajat2d ago
hey @Joebeurg its ok, I will mark it solved 🙂
Ask Inkeep
Ask Inkeep2d ago
Glad I could be helpful. Feel free to create a new thread with any new questions you may have.

Did you find this page helpful?