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