fix(db): prevent silent failures in sql_select

- Modify sql_select to return False on database exceptions instead of an empty result
- Update V3 Search endpoint to catch False results and return a 500 Internal Server Error
- Enhances error visibility for frontend developers and prevents misleading 200 OK responses during SQL errors
This commit is contained in:
Scott Idem
2026-01-21 19:49:58 -05:00
parent bdd1bd2ba2
commit e8322b4b1a
2 changed files with 6 additions and 1 deletions

View File

@@ -312,7 +312,7 @@ def sql_select(
except Exception as e:
log.error(f"SQL Fetch Error: {e}")
set_last_sql_error(e)
return [] if as_list else None
return False
count = len(rows)