fix: More informative logging on github webhook delivery#412
fix: More informative logging on github webhook delivery#412adityachoudhari26 merged 1 commit intomainfrom
Conversation
WalkthroughThis pull request enhances error handling and logging across multiple modules. In the webhook route, a logger is introduced to capture error details and the error extraction process is refined. In the workflow handler, a missing job now triggers a thrown error with contextual details, rather than silently returning. Additionally, the job update function now produces a more descriptive error message by including the job ID when a job is not found. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant WebhookRoute
participant Logger
Client->>WebhookRoute: POST webhook event
Note right of WebhookRoute: Process event and detect error
WebhookRoute->>Logger: Log error details (using child logger)
WebhookRoute->>Client: Return error response (HTTP 500)
sequenceDiagram
participant WorkflowHandler
participant Caller
WorkflowHandler->>WorkflowHandler: Fetch job
alt Job is found
WorkflowHandler-->>Caller: Proceed with job processing
else Job is not found
WorkflowHandler-->>Caller: Throw error with externalId & name
end
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (3)
🧰 Additional context used📓 Path-based instructions (1)`**/*.{ts,tsx}`: **Note on Error Handling:** Avoid strict enforcement of try/catch blocks. Code may use early returns, Promise chains (.then().catch()), or other patterns for error...
🧬 Code Definitions (1)apps/webservice/src/app/api/github/webhook/workflow/handler.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms (4)
🔇 Additional comments (5)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Summary by CodeRabbit