Fix: missing DB columns (ml_score, capacity_hours) + CSS escape fix + SQL error logging
Build & Auto-Repair / build (push) Has been cancelled
Build & Auto-Repair / build (push) Has been cancelled
This commit is contained in:
@@ -24,6 +24,12 @@ export async function query(text: string, params?: unknown[], userId?: string) {
|
||||
}
|
||||
const result = await client.query(text, params)
|
||||
return result
|
||||
} catch (error) {
|
||||
const msg = error instanceof Error ? error.message : String(error)
|
||||
console.error(`[DB] query failed — ${msg}`)
|
||||
console.error(`[DB] SQL: ${text}`)
|
||||
if (params && params.length > 0) console.error(`[DB] Params:`, JSON.stringify(params))
|
||||
throw error
|
||||
} finally {
|
||||
client.release()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user