fix(core): populate connector_http_status_code on UCS PSync connector error#12963
fix(core): populate connector_http_status_code on UCS PSync connector error#12963AmitsinghTanwar007 wants to merge 1 commit into
Conversation
… error When UCS surfaces a connector error as a gRPC ConnectorError on the PSync flow, the gateway built the ErrorResponse (carrying status_code) but never set router_data.connector_http_status_code, leaving it None. The native PSync path and the UCS success path both populate it from the connector HTTP status. Mirror the success path so the field is set on the error branch too. Closes #12962 Fixes juspay/hyperswitch-cloud#17201 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Review SummaryPR #12963 correctly propagates AnalysisChange: Adds Why this matters: The Code quality notes:
One minor suggestion: Consider adding a debug log when the status code is populated on the error path, similar to how other gateway operations log connector responses. This would help with troubleshooting in production: logger::debug!(
"UCS PSync error: connector_http_status_code={}",
status_code
);Overall, this is a clean fix that addresses a gap in error handling. ✅ |
XyneSpaces
left a comment
There was a problem hiding this comment.
Review comment on connector_http_status_code addition
| ); | ||
| // Mirror the success path: propagate the connector HTTP | ||
| // status code from the UCS connector error so that | ||
| // `connector_http_status_code` is populated (matching the |
There was a problem hiding this comment.
[nit] This change mirrors #12971. Consider if both gateway files (authorize_gateway.rs and psync_gateway.rs) should share this logic via a common helper method to ensure consistent behavior across UCS error handling paths.
Closes #12986