Skip to content

Commit

Permalink
Slight improvement to warn message
Browse files Browse the repository at this point in the history
  • Loading branch information
darunrs committed Mar 28, 2024
1 parent 58d5795 commit 0b343a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runner/src/indexer/indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@ export default class Indexer {
}, {});
return result;
} catch (error) {
const errorContent = error as Error;
console.warn(`${functionName}: Caught error when generating context.db methods. Building no functions. You can still use other context object methods.`, errorContent.message);
const errorContent = error as { message: string, location: Record<string, any> };
console.warn(`${functionName}: Caught error when generating context.db methods. Building no functions. You can still use other context object methods.\nError: ${errorContent.message}\nLocation: `, errorContent.location);
}
return {}; // Default to empty object if error
}
Expand Down

0 comments on commit 0b343a7

Please sign in to comment.