open-notebook/open_notebook
Luis Novo a329806a33
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
..
ai fix: improve error logging for chat model configuration issues (#458) 2026-01-23 16:45:13 -03:00
database fix: improve error handling in repo_create and repo_insert (#474) 2026-01-25 15:11:51 -03:00
domain feat: add cascade deletion for notebooks with delete preview (#471) 2026-01-25 14:56:14 -03:00
graphs feat: content-type aware chunking and unified embedding (#444) 2026-01-21 23:49:08 -03:00
podcasts Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
utils feat: add cascade deletion for notebooks with delete preview (#471) 2026-01-25 14:56:14 -03:00
__init__.py refactor: move environment variables loading to application entry point (#283) 2025-12-01 14:59:50 -03:00
CLAUDE.md feat: content-type aware chunking and unified embedding (#444) 2026-01-21 23:49:08 -03:00
config.py feat: add persistent tiktoken cache to reduce re-downloads (#171) 2025-10-19 14:50:52 -03:00
exceptions.py refactor database module and migrations 2024-10-30 16:33:07 -03:00