MCPcopy Create free account
hub / github.com/modelcontextprotocol/go-sdk / isTransientHTTPStatus

Function isTransientHTTPStatus

mcp/streamable.go:2276–2286  ·  view source on GitHub ↗

isTransientHTTPStatus reports whether the HTTP status code indicates a transient server error that should not permanently break the connection.

(statusCode int)

Source from the content-addressed store, hash-verified

2274// isTransientHTTPStatus reports whether the HTTP status code indicates a
2275// transient server error that should not permanently break the connection.
2276func isTransientHTTPStatus(statusCode int) bool {
2277 switch statusCode {
2278 case http.StatusInternalServerError, // 500
2279 http.StatusBadGateway, // 502
2280 http.StatusServiceUnavailable, // 503
2281 http.StatusGatewayTimeout, // 504
2282 http.StatusTooManyRequests: // 429
2283 return true
2284 }
2285 return false
2286}

Callers 1

checkResponseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…