π OpenHands: AI-Driven Development
Refactor get_microagents_from_org_or_user error handling (#9865)
Graham Neubig00582a487c44
diff --git a/openhands/runtime/base.py b/openhands/runtime/base.pyindex 084ec208cb..1423092579 100644--- a/openhands/runtime/base.py+++ b/openhands/runtime/base.py@@ -49,6 +49,7 @@ from openhands.integrations.provider import (ProviderHandler,ProviderType,)+from openhands.integrations.service_types import AuthenticationErrorfrom openhands.microagent import (BaseMicroagent,load_microagents_from_dir,@@ -701,12 +702,18 @@ fiGENERAL_TIMEOUT,org_openhands_repo,)+ except AuthenticationError as e:+ self.log(+ 'debug',+ f'org-level microagent directory {org_openhands_repo} not found: {str(e)}',+ )+ raiseexcept Exception as e:self.log(- 'error',+ 'debug',f'Failed to get authenticated URL for {org_openhands_repo}: {str(e)}',)- raise Exception(str(e))+ raiseclone_cmd = (f'GIT_TERMINAL_PROMPT=0 git clone --depth 1 {remote_url} {org_repo_dir}'@@ -762,6 +769,11 @@ fif'Clone command output: {clone_error_msg}',)+ except AuthenticationError as e:+ self.log(+ 'debug',+ f'org-level microagent directory {org_openhands_repo} not found: {str(e)}',+ )except Exception as e:self.log('debug',