mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 15:03:16 +00:00
chore:updated logging
This commit is contained in:
parent
1241028dc3
commit
257f08b196
1 changed files with 4 additions and 6 deletions
|
|
@ -183,6 +183,7 @@ async def get_github_token_for_user(ls_user_id: str, tenant_id: str) -> dict[str
|
|||
Dict with either 'token' key or 'auth_url' key
|
||||
"""
|
||||
if not GITHUB_OAUTH_PROVIDER_ID:
|
||||
logger.error("GitHub auth failed: GITHUB_OAUTH_PROVIDER_ID is not configured")
|
||||
return {"error": "GITHUB_OAUTH_PROVIDER_ID not configured"}
|
||||
|
||||
try:
|
||||
|
|
@ -220,9 +221,10 @@ async def get_github_token_for_user(ls_user_id: str, tenant_id: str) -> dict[str
|
|||
return {"error": f"Unexpected auth result: {response_data}"}
|
||||
|
||||
except httpx.HTTPStatusError as e:
|
||||
logger.error("GitHub auth API HTTP error: %s - %s", e.response.status_code, e.response.text)
|
||||
return {"error": f"HTTP error: {e.response.status_code} - {e.response.text}"}
|
||||
except Exception as e: # noqa: BLE001
|
||||
logger.warning("GitHub auth API call failed: %s: %s", type(e).__name__, str(e))
|
||||
logger.error("GitHub auth API call failed: %s: %s", type(e).__name__, str(e))
|
||||
return {"error": str(e)}
|
||||
|
||||
|
||||
|
|
@ -559,11 +561,7 @@ async def process_linear_issue( # noqa: PLR0912, PLR0915
|
|||
await comment_on_linear_issue(issue_id, comment)
|
||||
return
|
||||
else:
|
||||
logger.warning(
|
||||
"Auth result has neither token nor auth_url: %s (error=%r)",
|
||||
auth_result,
|
||||
auth_result.get("error"),
|
||||
)
|
||||
logger.warning("Auth result has neither token nor auth_url: %s", auth_result)
|
||||
else:
|
||||
logger.warning("User %s not found in LangSmith workspace", user_email)
|
||||
comment = (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue