diff --git a/.changeset/silver-wasps-count.md b/.changeset/silver-wasps-count.md new file mode 100644 index 0000000000..2fdac237e4 --- /dev/null +++ b/.changeset/silver-wasps-count.md @@ -0,0 +1,5 @@ +--- +"@latticexyz/store-indexer": patch +--- + +The error log if no data is found in `/api/logs` is now stringifying the filter instead of logging `[object Object]`. diff --git a/packages/store-indexer/src/postgres/apiRoutes.ts b/packages/store-indexer/src/postgres/apiRoutes.ts index 92ca7e0b3d..8f71014cbc 100644 --- a/packages/store-indexer/src/postgres/apiRoutes.ts +++ b/packages/store-indexer/src/postgres/apiRoutes.ts @@ -36,7 +36,11 @@ export function apiRoutes(database: Sql): Middleware { if (records.length === 0) { ctx.status = 404; ctx.body = "no logs found"; - error(`no logs found for chainId ${options.chainId}, address ${options.address}, filters ${options.filters}`); + error( + `no logs found for chainId ${options.chainId}, address ${options.address}, filters ${JSON.stringify( + options.filters + )}` + ); return; }