Classify ECONNRESET as codes.Unavailable in Okta API error handling#157
Classify ECONNRESET as codes.Unavailable in Okta API error handling#157btipling wants to merge 1 commit into
Conversation
|
Claude finished @btipling's task in 58s —— View job PR Review: Classify ECONNRESET as codes.Unavailable
Verdict: Looks good ✅ This is a small, well-motivated change. The analysis: CorrectnessThe change at The placement is good — checking ECONNRESET before the MotivationThe PR description explains the problem clearly: the Okta Go SDK bypasses baton-sdk's Minor noteThe One thing to note: if No issues found. Ship it. |
The Okta Go SDK makes its own HTTP calls (not through baton-sdk's uhttp). When the proxy resets the TCP connection, the error surfaces as syscall.ECONNRESET wrapped in a url.Error. Without explicit handling, this flows through as codes.Unknown, causing IsSyncPreservable to return false and the c1z artifact to be discarded on every retry. This matches the existing pattern in baton-sdk's uhttp BaseHttpClient (wrapper.go:472) which already classifies ECONNRESET as Unavailable for connectors that use it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e4523f1 to
a06997d
Compare
|
Claude finished @btipling's task in 55s —— View job PR Review: Classify ECONNRESET as codes.Unavailable
Verdict: Looks good ✅ This is a small, well-motivated change. The analysis: CorrectnessThe change at The placement is good — checking ECONNRESET before the MotivationThe PR description explains the problem clearly: the Okta Go SDK bypasses baton-sdk's Details
No issues found. Ship it. |
Summary
syscall.ECONNRESETcheck inhandleOktaResponseErrorWithNotFoundMessageto returncodes.Unavailablecodes.UnknownIsSyncPreservabledoes not considercodes.Unknownpreservable, so the c1z artifact was discarded on every retry, forcing syncs to restart from scratchBaseHttpClient(wrapper.go:472) which already classifiesECONNRESETasUnavailableTest plan
codes.Unavailableinstead ofcodes.Unknown🤖 Generated with Claude Code