Skip to content

Commit

Permalink
Update packages/plugin-nft-collections/src/actions/get-collections.ts
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
wtfsayo and coderabbitai[bot] authored Jan 12, 2025
1 parent c09d8dd commit 2463eb4
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@ export const getCollectionsAction = (
});
return true;
} catch (error) {
console.error("Error fetching NFT collections:", error);
const errorMessage = error instanceof Error
? `Failed to fetch NFT collections: ${error.message}`
: "An unexpected error occurred while fetching NFT collections.";
console.error(errorMessage);
await runtime.messageManager.createMemory({
id: message.id,
content: { text: "Failed to fetch NFT collection data." },
content: { text: errorMessage },
roomId: message.roomId,
userId: message.userId,
agentId: runtime.agentId,
Expand Down

0 comments on commit 2463eb4

Please sign in to comment.