FRAMENGG-13161 support app error - #16
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughSample webhook handlers now return structured 400/409 responses for non-retryable conditions, preserve HTTP status information from CRM errors, and throw transient failures so the platform can retry them. Shared ChangesHandler error semantics
Estimated code review effort: 3 (Moderate) | ~20 minutes Assessment against linked issues
Suggested reviewers: 🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
Comment |
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@sample-apps/sample-apps-with-iparams/schedule_advance_invoice_sample_app/handler/handler.js`:
- Around line 26-31: Update the handler’s scheduleAdvanceInvoice flow so
Chargebee 4xx failures from advanceInvoiceSchedule are propagated or converted
into a structured non-retryable response rather than completing without a
HandlerResult. Ensure the handler reports success only after scheduling
succeeds, while preserving transient-failure signaling for retryable errors.
In
`@sample-apps/sample-apps-without-iparams/dunning_cycle_end_handler_sample_app/handler/handler.js`:
- Around line 16-24: Update the prevalidation around the handler’s subscription
lookup to match handleInvoiceUpdated: skip non-exhausted events before
validating, and resolve the subscription using invoice.subscription_id with
subscription.id as the fallback. Return the existing 400 response only when an
exhausted event has neither subscription identifier.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 67f2f917-e8d5-42d8-b3cd-fc9c0a7da7b5
📒 Files selected for processing (7)
sample-apps/sample-apps-with-iparams/crm_lead_on_customer_created_sample_app/handler/crmLead.jssample-apps/sample-apps-with-iparams/crm_lead_on_customer_created_sample_app/handler/handler.jssample-apps/sample-apps-with-iparams/crm_lead_on_customer_created_sample_app/types/types.d.tssample-apps/sample-apps-with-iparams/schedule_advance_invoice_sample_app/handler/handler.jssample-apps/sample-apps-with-iparams/schedule_advance_invoice_sample_app/types/types.d.tssample-apps/sample-apps-without-iparams/dunning_cycle_end_handler_sample_app/handler/handler.jssample-apps/sample-apps-without-iparams/dunning_cycle_end_handler_sample_app/types/types.d.ts
CHANGELOG
FRAMENGG-13161 support app error
SUMMARY
FRAMENGG-13161 support app error
FUNCTIONAL AUTOMATION CHANGES PR
AUTOMATION TEST REPORT URL
NA
AREAS OF IMPACT
NA
TYPE OF CHANGE
DOCUMENTATION
NA
Enhanced sample apps to distinguish non-retryable application errors from transient platform failures. Added structured HTTP error status handling, duplicate-contact responses, payload validation, subscription checks, retry-aware exception behavior, and shared
HandlerResulttypes for status codes and response bodies.