fix-sqlalchemy-pending-rollback-loop
CommunityFix and preventPendingRollbackError loops in FastAPI/SQLAlchemy applications
Authorruskibeats
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Addresses the issue of PersistentRollbackError loops in FastAPI/SQLAlchemy async services, caused by unhandled exceptions not properly rolling back transactions.
Core Features & Use Cases
- Automatic Rollback on Exception: Ensures the session is rolled back on error to maintain a clean session state.
- Prefer Transaction Context Managers: Encourages using transaction context managers for multi-step operations for automatic rollback and commit.
- API Layer Exception Handling: Adds error handling in API endpoints to manage session issues without cascading to subsequent requests.
- Dependency-Level Defense: Implements rollback logic in session dependencies to prevent issues when services are called in rapid succession.
Quick Start
Add this Skill to your FastAPI/SQLAlchemy application to automatically manage and resolve session rollbacks caused by unhandled exceptions.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: fix-sqlalchemy-pending-rollback-loop Download link: https://github.com/ruskibeats/t1d/archive/main.zip#fix-sqlalchemy-pending-rollback-loop Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 620,000+ vetted skills library on demand.