Skip to content

Commit 2463eb4

Browse files
Update packages/plugin-nft-collections/src/actions/get-collections.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent c09d8dd commit 2463eb4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/plugin-nft-collections/src/actions/get-collections.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,13 @@ export const getCollectionsAction = (
3939
});
4040
return true;
4141
} catch (error) {
42-
console.error("Error fetching NFT collections:", error);
42+
const errorMessage = error instanceof Error
43+
? `Failed to fetch NFT collections: ${error.message}`
44+
: "An unexpected error occurred while fetching NFT collections.";
45+
console.error(errorMessage);
4346
await runtime.messageManager.createMemory({
4447
id: message.id,
45-
content: { text: "Failed to fetch NFT collection data." },
48+
content: { text: errorMessage },
4649
roomId: message.roomId,
4750
userId: message.userId,
4851
agentId: runtime.agentId,

0 commit comments

Comments
 (0)