Skip to content

Commit

Permalink
fix: db.update error log (#1252)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyscott18 authored Nov 16, 2024
1 parent 7cf1f89 commit 8b211d6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/strange-dogs-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ponder/core": patch
---

Improved error log for `context.db.update()`.
4 changes: 2 additions & 2 deletions packages/core/src/indexing-store/historical.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ export const createHistoricalIndexingStore = ({
`No existing record found in table '${tableNameCache.get(table)}'`,
);
error.meta.push(
`db.update arguments:\n${prettyPrint(values)}`,
`db.update arguments:\n${prettyPrint(key)}`,
);
throw error;
}
Expand All @@ -660,7 +660,7 @@ export const createHistoricalIndexingStore = ({
`No existing record found in table '${tableNameCache.get(table)}'`,
);
error.meta.push(
`db.update arguments:\n${prettyPrint(values)}`,
`db.update arguments:\n${prettyPrint(key)}`,
);
throw error;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/indexing-store/realtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export const createRealtimeIndexingStore = ({
`No existing record found in table '${tableNameCache.get(table)}'`,
);
error.meta.push(
`db.update arguments:\n${prettyPrint(values)}`,
`db.update arguments:\n${prettyPrint(key)}`,
);
throw error;
}
Expand Down

0 comments on commit 8b211d6

Please sign in to comment.