MCPcopy
hub / github.com/NVIDIA/aistore / Error

Method Error

cmn/err.go:752–761  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

750}
751
752func (e *ErrHTTP) Error() string {
753 // Stop from escaping `<`, `>` and `&`.
754 buf := new(bytes.Buffer)
755 enc := jsoniter.NewEncoder(buf)
756 enc.SetEscapeHTML(false)
757 if err := enc.Encode(e); err != nil {
758 return err.Error()
759 }
760 return buf.String()
761}
762
763func (e *ErrHTTP) write(w http.ResponseWriter, r *http.Request, silent bool) {
764 msg := e.Error()

Callers 1

writeMethod · 0.95

Calls 2

StringMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected