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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user