claude-codex-proxy 1.0.5-beta.24 → 1.0.5-beta.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/middleware/sse.js +3 -0
package/package.json
CHANGED
package/src/middleware/sse.js
CHANGED
|
@@ -115,6 +115,9 @@ function getErrorStatus(error) {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
function getAnthropicErrorType(error, status) {
|
|
118
|
+
// Claude Code retries streamed overload errors by their Anthropic error type.
|
|
119
|
+
// HTTP status is already committed after SSE starts, so preserve 5xx semantics here.
|
|
120
|
+
if (status >= 500) return 'overloaded_error';
|
|
118
121
|
if (error?.anthropicErrorType) return error.anthropicErrorType;
|
|
119
122
|
if (status === 401) return 'authentication_error';
|
|
120
123
|
if (status === 429) return 'rate_limit_error';
|