Drizzle ORM HTTP SQlite proxy does not work with JSON mode text

Hey, another issue: The drizzle http proxy for sqlite always throws a tantrum when it encounters any column with json text. Here is the error:

iscord API Error: SyntaxError: "undefined" is not valid JSON
    at JSON.parse (<anonymous>)
    at SQLiteTextJson.mapFromDriverValue (C:/Users/finni/Documents/GitHub/odysseus/workers/odysseus/node_modules/.vite/deps_odysseus/chunk-2KT35FK6.js:640:17)
    at C:/Users/finni/Documents/GitHub/odysseus/workers/odysseus/node_modules/.vite/deps_odysseus/chunk-EQOYNP3A.js:213:78
    at Array.reduce (<anonymous>)
    at mapResultRow (C:/Users/finni/Documents/GitHub/odysseus/workers/odysseus/node_modules/.vite/deps_odysseus/chunk-EQOYNP3A.js:194:26)
    at C:/Users/finni/Documents/GitHub/odysseus/workers/odysseus/node_modules/.vite/deps_odysseus/drizzle-orm_sqlite-proxy.js:136:26
    at Array.map (<anonymous>)
    at RemotePreparedQuery.mapAllResult (C:/Users/finni/Documents/GitHub/odysseus/workers/odysseus/node_modules/.vite/deps_odysseus/drizzle-orm_sqlite-proxy.js:135:17)
    at RemotePreparedQuery.all (C:/Users/finni/Documents/GitHub/odysseus/workers/odysseus/node_modules/.vite/deps_odysseus/drizzle-orm_sqlite-proxy.js:150:17)
    at C:/Users/finni/Documents/GitHub/odysseus/workers/odysseus/src/services/bot/commands/register.ts:25:32


My server successfully returns the fields though, so I don't really think this is an issue on my side (Or I'm just stupid)

Query result rows: [
  {
    id: 'w6NfuUel8ESZs9lQFEF5D',
    email: '27423da2-9fe3-411a-a8a6-685f72e83fe1@fortnite.ac',
    username: 'Zetax',
    password_hash: '',
    banned: 0,
    discord_id: '1070096922314031235',
    creator: 0,
    settings: '{"privacy":{"optOutOfPublicLeaderboards":false},"friends":{"mutualPrivacy":"ALL","acceptInvites":"private"}}'
  }
]
Was this page helpful?