Another fix to get_table_json

IIteration error is not a SQL error, so gotta catch generic errors, too
This commit is contained in:
Ingo Ratsdorf
2025-09-10 12:32:23 +12:00
parent 24eaf1e143
commit 7f7b0a328f

View File

@@ -200,7 +200,9 @@ def get_table_json(sql, sql_query):
except sqlite3.Error as e:
mylog('verbose', ['[Database] - SQL ERROR: ', e])
return json_obj({"data": []}, []) # return empty object
except Exception as e:
mylog('verbose', ['[Database] - Unexpected ERROR: ', e])
return json_obj({"data": []}, [])
#-------------------------------------------------------------------------------
class json_obj: