langchain/callbacks/comet_ml_callback.py/CometCallbackHandler/on_tool_error
class CometCallbackHandler:    def on_tool_error(
        self, error: Union[Exception, KeyboardInterrupt], **kwargs: Any
    ) -> None:
        """Run when tool errors."""
        self.step += 1
        self.errors += 1