Skip to content

Commit

Permalink
improve: Enhance Chainbase query error handling
Browse files Browse the repository at this point in the history
- Replace generic "error" return with descriptive error message
- Provide user-friendly error feedback through callback
- Optimize function return logic
  • Loading branch information
lxcong committed Jan 21, 2025
1 parent 88fc11d commit 86b877d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/plugin-chainbase/src/actions/queryData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ export const queryBlockChainData: Action = {
});
} catch (error) {
elizaLogger.error("Error in queryChainbase action:", error);
return "error";
callback({
text: "An error occurred while querying the blockchain. Please try again later.",
});
return ;
}
},

Expand Down

0 comments on commit 86b877d

Please sign in to comment.