mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
Refactor get_microagents_from_org_or_user error handling (#9865)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
parent
7a168b9b5f
commit
00582a487c
@ -49,6 +49,7 @@ from openhands.integrations.provider import (
|
||||
ProviderHandler,
|
||||
ProviderType,
|
||||
)
|
||||
from openhands.integrations.service_types import AuthenticationError
|
||||
from openhands.microagent import (
|
||||
BaseMicroagent,
|
||||
load_microagents_from_dir,
|
||||
@ -701,12 +702,18 @@ fi
|
||||
GENERAL_TIMEOUT,
|
||||
org_openhands_repo,
|
||||
)
|
||||
except AuthenticationError as e:
|
||||
self.log(
|
||||
'debug',
|
||||
f'org-level microagent directory {org_openhands_repo} not found: {str(e)}',
|
||||
)
|
||||
raise
|
||||
except Exception as e:
|
||||
self.log(
|
||||
'error',
|
||||
'debug',
|
||||
f'Failed to get authenticated URL for {org_openhands_repo}: {str(e)}',
|
||||
)
|
||||
raise Exception(str(e))
|
||||
raise
|
||||
|
||||
clone_cmd = (
|
||||
f'GIT_TERMINAL_PROMPT=0 git clone --depth 1 {remote_url} {org_repo_dir}'
|
||||
@ -762,6 +769,11 @@ fi
|
||||
f'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',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user