arwat
arwat
BABetter Auth
Created by arwat on 4/8/2025 in #help
converting bigint
When getting the session, I am encountering a problem that the json that contains the user and the session cannot convert because both are bigint. Is there a solution for this?
# SERVER_ERROR: 187 | headers.set("Content-Type", "application/x-www-form-urlencoded");
188 | } else if (data instanceof ReadableStream) {
189 | body = data;
190 | headers.set("Content-Type", "application/octet-stream");
191 | } else if (isJSONSerializable(data)) {
192 | body = JSON.stringify(data);
^
TypeError: JSON.stringify cannot serialize BigInt.
at toResponse (/Users/artur/Developer/project/node_modules/better-call/dist/index.js:192:17)
# SERVER_ERROR: 187 | headers.set("Content-Type", "application/x-www-form-urlencoded");
188 | } else if (data instanceof ReadableStream) {
189 | body = data;
190 | headers.set("Content-Type", "application/octet-stream");
191 | } else if (isJSONSerializable(data)) {
192 | body = JSON.stringify(data);
^
TypeError: JSON.stringify cannot serialize BigInt.
at toResponse (/Users/artur/Developer/project/node_modules/better-call/dist/index.js:192:17)
8 replies