Restore the mutable state with an explicit rollback before returning. Catch the narrow database exception at the boundary, add operation context without losing the cause, and either re-raise or return a structured failure that identifies the partial mutation and required next action.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Python Error Handling?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-python-error-handling-agent-skills-standard)
Restore the mutable state with an explicit rollback before returning. Catch the narrow database exception at the boundary, add operation context without losing the cause, and either re-raise or return a structured failure that identifies the partial mutation and required next action.