mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-04-28 19:40:50 +00:00
* fix: improve error handling in repo_create and repo_insert When SurrealDB encounters an error (e.g., schema validation failure), it may return a string error message instead of the expected record. Previously, this caused a confusing "'str' object has no attribute 'items'" error in base.py:save(). This change adds error string detection to repo_create() and repo_insert(), raising a RuntimeError with the actual SurrealDB error message. This helps debug issues like #469 by showing the underlying database error. Related to #469 * fix: preserve error details in repo_insert RuntimeError handling The RuntimeError with SurrealDB error message was being caught by the broad 'except Exception' block and replaced with a generic 'Failed to create record' message. Now RuntimeError is caught separately and re-raised, preserving the actual error details for debugging. |
||
|---|---|---|
| .. | ||
| migrations | ||
| async_migrate.py | ||
| CLAUDE.md | ||
| migrate.py | ||
| repository.py | ||