V1.2.0 deploy.sh angepasst

try/catch be SQL-Abfragen
This commit is contained in:
rxf
2026-03-15 13:56:16 +01:00
parent 7da9e27687
commit 23ac4ed8d7
5 changed files with 40 additions and 4 deletions

View File

@@ -29,6 +29,10 @@ export default function TablettenTable() {
try {
const res = await fetch(`/api/data?sidx=${sortField}&sord=${sortDir}`);
const json = await res.json();
if (!res.ok) {
setError(`Fehler beim Laden: ${json.error ?? res.status}`);
return;
}
setRows(json.values || []);
} catch {
setError('Fehler beim Laden der Daten.');