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