Postgres adapter for @slices/session crashes in at least two distinct ways:
SyntaxError: "[object Object]" is not valid JSON
at JSON.parse (<anonymous>)
at g.rowToSessionData (.next/server/chunks/585.js:96:830)
at g.get (.next/server/chunks/585.js:79:246)
at async e.getSession (.next/server/chunks/585.js:1:8883)
TypeError: a.created_at.getTime is not a function
at g.rowToSessionData (.next/server/chunks/585.js:96:856)
at g.get (.next/server/chunks/585.js:79:246)
at async e.getSession (.next/server/chunks/585.js:1:8883)
The problems are:
- We have
BIGINTfor times, so we should've usednumber. There's no need forgetTime. - We have
JSONBfordata, so we should've treated it as aRecord. There's no need forJSON.parse.