MCPcopy
hub / github.com/XiaoMi/naftis / writeError

Function writeError

src/api/service/promethues.go:251–255  ·  view source on GitHub ↗
(w http.ResponseWriter, err error)

Source from the content-addressed store, hash-verified

249}
250
251func writeError(w http.ResponseWriter, err error) {
252 w.WriteHeader(http.StatusInternalServerError)
253 _, writeErr := w.Write([]byte(err.Error()))
254 log.Error("[Graph] writeError", "err", writeErr, "orgerr", err)
255}
256
257func (p *promHandler) generate(opts genOpts) (*Dynamic, error) {
258 client, err := api.NewClient(api.Config{Address: p.addr})

Callers 1

ServeHTTPMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected