MCPcopy Create free account
hub / github.com/google/pprof / statusCodeError

Function statusCodeError

internal/symbolizer/symbolizer.go:116–124  ·  view source on GitHub ↗
(resp *http.Response)

Source from the content-addressed store, hash-verified

114}
115
116func statusCodeError(resp *http.Response) error {
117 if resp.Header.Get("X-Go-Pprof") != "" && strings.Contains(resp.Header.Get("Content-Type"), "text/plain") {
118 // error is from pprof endpoint
119 if body, err := io.ReadAll(resp.Body); err == nil {
120 return fmt.Errorf("server response: %s - %s", resp.Status, body)
121 }
122 }
123 return fmt.Errorf("server response: %s", resp.Status)
124}
125
126// doLocalSymbolize adds symbol and line number information to all locations
127// in a profile. mode enables some options to control

Callers 1

postURLFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…