Commit Graph

6 Commits

Author SHA1 Message Date
Kian Jones
0d42afa151 fix(core): catch LockNotAvailableError and return 409 instead of 500 (#9359)
Re-apply changes on top of latest main to resolve merge conflicts.

- Add DatabaseLockNotAvailableError custom exception in orm/errors.py
- Catch asyncpg LockNotAvailableError and pgcode 55P03 in _handle_dbapi_error
- Register FastAPI exception handler returning 409 with Retry-After header



🐾 Generated with [Letta Code](https://letta.com)

Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com>
Co-authored-by: Letta <noreply@letta.com>
2026-02-24 10:52:07 -08:00
Kian Jones
d592ec3135 fix: handle DBAPIError wrapping asyncpg DeadlockDetectedError (#9355)
SQLAlchemy wraps asyncpg's DeadlockDetectedError in a DBAPIError,
which was falling through to the generic 500 handler. Now detected
at both the ORM level (_handle_dbapi_error) and FastAPI handler level,
returning 409 with Retry-After header.

Datadog: https://us5.datadoghq.com/error-tracking/issue/2f1dc54c-dab6-11f0-a828-da7ad0900000

🐾 Generated with [Letta Code](https://letta.com)

Co-authored-by: Letta <noreply@letta.com>
2026-02-24 10:52:07 -08:00
Matthew Zhou
e09bde67ef fix: Scale up database (#2263) 2024-12-17 15:02:28 -08:00
Matthew Zhou
8711e1dc00 chore: Change create_tool endpoint on v1 routes to error instead of upsert (#2102) 2024-11-25 10:46:15 -08:00
Matthew Zhou
ff4be4576b feat: Add ORM for user model (#1924) 2024-10-23 10:28:00 -07:00
Matthew Zhou
1be576a28e feat: Add ORM for organization model (#1914) 2024-10-22 14:47:09 -07:00