.catch(() => null) unioned the query result with null, so destructuring the first row failed typecheck (TS2488). Return an empty array on failure instead and drop unused connection/desc imports.