ponder-sh / ponder

A backend framework for crypto apps
https://ponder.sh
MIT License
641 stars 102 forks source link

[Bug] Not null constraint errors do not include user stack trace #827

Closed 0xOlias closed 6 months ago

0xOlias commented 6 months ago

We handle unique constraints properly.

12:22:26 PM ERROR indexing   Error while processing "DegenToken:Transfer" event at chainId=8453, block=13530005: 
error: null value in column "gasUsed" of relation "TransferEvent" violates not-null constraint
    at /Users/kevinkoste/workspace/ponder/node_modules/.pnpm/pg@8.11.3/node_modules/pg/lib/client.js:526:17
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at PostgresConnection.executeQuery (file:///Users/kevinkoste/workspace/ponder/node_modules/.pnpm/kysely@0.26.3/node_modules/kysely/dist/esm/dialect/postgres/postgres-driver.js:69:28)
    at PostgresConnection.connection.executeQuery (file:///Users/kevinkoste/workspace/ponder/node_modules/.pnpm/kysely@0.26.3/node_modules/kysely/dist/esm/driver/runtime-driver.js:89:24)
    at file:///Users/kevinkoste/workspace/ponder/node_modules/.pnpm/kysely@0.26.3/node_modules/kysely/dist/esm/query-executor/query-executor-base.js:35:28
    at DefaultConnectionProvider.provideConnection (file:///Users/kevinkoste/workspace/ponder/node_modules/.pnpm/kysely@0.26.3/node_modules/kysely/dist/esm/driver/default-connection-provider.js:10:20)
    at DefaultQueryExecutor.executeQuery (file:///Users/kevinkoste/workspace/ponder/node_modules/.pnpm/kysely@0.26.3/node_modules/kysely/dist/esm/query-executor/query-executor-base.js:34:16)
    at InsertQueryBuilder.execute (file:///Users/kevinkoste/workspace/ponder/node_modules/.pnpm/kysely@0.26.3/node_modules/kysely/dist/esm/query-builder/insert-query-builder.js:515:24)
    at InsertQueryBuilder.executeTakeFirst (file:///Users/kevinkoste/workspace/ponder/node_modules/.pnpm/kysely@0.26.3/node_modules/kysely/dist/esm/query-builder/insert-query-builder.js:530:26)
    at InsertQueryBuilder.executeTakeFirstOrThrow (file:///Users/kevinkoste/workspace/ponder/node_modules/.pnpm/kysely@0.26.3/node_modules/kysely/dist/esm/query-builder/insert-query-builder.js:542:24)
    at PostgresConnection.executeQuery (file:///Users/kevinkoste/workspace/ponder/node_modules/.pnpm/kysely@0.26.3/node_modules/kysely/dist/esm/dialect/postgres/postgres-driver.js:88:41)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at PostgresConnection.connection.executeQuery (file:///Users/kevinkoste/workspace/ponder/node_modules/.pnpm/kysely@0.26.3/node_modules/kysely/dist/esm/driver/runtime-driver.js:89:24)
    at file:///Users/kevinkoste/workspace/ponder/node_modules/.pnpm/kysely@0.26.3/node_modules/kysely/dist/esm/query-executor/query-executor-base.js:35:28
    at DefaultConnectionProvider.provideConnection (file:///Users/kevinkoste/workspace/ponder/node_modules/.pnpm/kysely@0.26.3/node_modules/kysely/dist/esm/driver/default-connection-provider.js:10:20)
    at DefaultQueryExecutor.executeQuery (file:///Users/kevinkoste/workspace/ponder/node_modules/.pnpm/kysely@0.26.3/node_modules/kysely/dist/esm/query-executor/query-executor-base.js:34:16)
    at InsertQueryBuilder.execute (file:///Users/kevinkoste/workspace/ponder/node_modules/.pnpm/kysely@0.26.3/node_modules/kysely/dist/esm/query-builder/insert-query-builder.js:515:24)
    at InsertQueryBuilder.executeTakeFirst (file:///Users/kevinkoste/workspace/ponder/node_modules/.pnpm/kysely@0.26.3/node_modules/kysely/dist/esm/query-builder/insert-query-builder.js:530:26)
    at InsertQueryBuilder.executeTakeFirstOrThrow (file:///Users/kevinkoste/workspace/ponder/node_modules/.pnpm/kysely@0.26.3/node_modules/kysely/dist/esm/query-builder/insert-query-builder.js:542:24)
0xOlias commented 6 months ago

Fixed in #828