Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AgentRunner : exception handling #134

Closed
planetf1 opened this issue Jan 23, 2025 · 1 comment
Closed

AgentRunner : exception handling #134

planetf1 opened this issue Jan 23, 2025 · 1 comment

Comments

@planetf1
Copy link
Collaborator

          We need a generic way to deal with exceptions. Right now it seems like you are just passing the exception to the caller. 

That’s one approach. Another approach to think about is an exception handler. So something like:

class AbstractAgent(ABC):
  #…
  def exception_handler(self, handler) -> error:
     pass
  #…

We can then let the handler object be defined and passed by the caller. This will allow exceptions to be handled by caller of the runner. For instance if there was a policy to retry.

Also if the handler is not defined then by default the exception is propagated up as you are doing now.

Originally posted by @maximilien in #125 (comment)

@maximilien
Copy link
Member

I think this is duplicate to #112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants