open-notebook/open_notebook/database
Luis Novo a329806a33
Some checks are pending
Development Build / extract-version (push) Waiting to run
Development Build / test-build (push) Blocked by required conditions
Development Build / summary (push) Blocked by required conditions
fix: improve error handling in repo_create and repo_insert (#474)
* 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.
2026-01-25 15:11:51 -03:00
..
migrations feat: content-type aware chunking and unified embedding (#444) 2026-01-21 23:49:08 -03:00
async_migrate.py perf: improve source listing speed by 20-30x (#436) 2026-01-15 22:29:20 -03:00
CLAUDE.md fix: reduce retry log noise during concurrent chunk processing 2026-01-05 11:30:55 -03:00
migrate.py Api podcast migration (#93) 2025-07-17 08:36:11 -03:00
repository.py fix: improve error handling in repo_create and repo_insert (#474) 2026-01-25 15:11:51 -03:00