-
Notifications
You must be signed in to change notification settings - Fork 205
Added more detailed exception for teams webhook failure #2031
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
Conversation
|
👋 @ofek1weiss |
WalkthroughIntroduces a new exception class TeamsWebhookHttpError and updates the Teams webhook messaging flow to catch requests HTTPError and re-raise it as TeamsWebhookHttpError with the original response attached. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant TeamsWebhook as TeamsWebhook
participant Requests as requests
participant Teams as Microsoft Teams
Client->>TeamsWebhook: send(message)
TeamsWebhook->>Requests: POST webhook_url with payload
Requests->>Teams: HTTP POST
alt Success
Teams-->>Requests: 2xx response
Requests-->>TeamsWebhook: Response
TeamsWebhook-->>Client: return
else HTTP error
Teams-->>Requests: 4xx/5xx response
Requests-->>TeamsWebhook: raise HTTPError (with Response)
TeamsWebhook-->>Client: raise TeamsWebhookHttpError (wraps Response)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)elementary/messages/messaging_integrations/teams_webhook.py (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (2)
Comment |
null
Summary by CodeRabbit