TypeError: Converting circular structure to JSON

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'PgSerial'
| property 'table' -> object with constructor 'PgTable'
--- property 'id' closes the circle
at JSON.stringify (<anonymous>)
at Context.json (file:///C:/dev/work/express/node_modules/.pnpm/[email protected]/node_modules/hono/dist/context.js:184:23)
at file:///C:/dev/work/express/src/index.js:17:21
at dispatch (file:///C:/dev/work/express/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:29:23)
at file:///C:/dev/work/express/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:30:20
at prettyJSON2 (file:///C:/dev/work/express/node_modules/.pnpm/[email protected]/node_modules/hono/dist/middleware/pretty-json/index.js:5:11)
at dispatch (file:///C:/dev/work/express/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:29:23)
at file:///C:/dev/work/express/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:6:12
at file:///C:/dev/work/express/node_modules/.pnpm/[email protected]/node_modules/hono/dist/hono-base.js:188:31
at Hono.dispatch (file:///C:/dev/work/express/node_modules/.pnpm/[email protected]/node_modules/hono/dist/hono-base.js:198:7)
TypeError: Converting circular structure to JSON
--> starting at object with constructor 'PgSerial'
| property 'table' -> object with constructor 'PgTable'
--- property 'id' closes the circle
at JSON.stringify (<anonymous>)
at Context.json (file:///C:/dev/work/express/node_modules/.pnpm/[email protected]/node_modules/hono/dist/context.js:184:23)
at file:///C:/dev/work/express/src/index.js:17:21
at dispatch (file:///C:/dev/work/express/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:29:23)
at file:///C:/dev/work/express/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:30:20
at prettyJSON2 (file:///C:/dev/work/express/node_modules/.pnpm/[email protected]/node_modules/hono/dist/middleware/pretty-json/index.js:5:11)
at dispatch (file:///C:/dev/work/express/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:29:23)
at file:///C:/dev/work/express/node_modules/.pnpm/[email protected]/node_modules/hono/dist/compose.js:6:12
at file:///C:/dev/work/express/node_modules/.pnpm/[email protected]/node_modules/hono/dist/hono-base.js:188:31
at Hono.dispatch (file:///C:/dev/work/express/node_modules/.pnpm/[email protected]/node_modules/hono/dist/hono-base.js:198:7)
No description
1 Reply
Joel Outeiro Pérez
Joel Outeiro PérezOP10mo ago
a bit of context omg solved (is not a problem of course): expecting a json on c.json(and returning a promise omg)
Want results from more Discord servers?
Add your server