MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / Report

Method Report

errorreport/errorreport.go:84–98  ·  view source on GitHub ↗

Report reports an error to all configured reporters with the request and its metadata.

(err errctx.Error, req *http.Request)

Source from the content-addressed store, hash-verified

82
83// Report reports an error to all configured reporters with the request and its metadata.
84func (r *Reporter) Report(err errctx.Error, req *http.Request) {
85 meta, ok := req.Context().Value(metaCtxKey{}).(map[string]any)
86 if !ok {
87 meta = nil
88 }
89
90 if url := err.DocsURL(); url != "" {
91 meta = maps.Clone(meta)
92 meta["Documentation URL"] = url
93 }
94
95 for _, reporter := range r.reporters {
96 reporter.Report(err, req, meta)
97 }
98}
99
100// Close closes all reporters
101func (r *Reporter) Close() {

Callers

nothing calls this directly

Calls 3

DocsURLMethod · 0.65
ReportMethod · 0.65
CloneMethod · 0.45

Tested by

no test coverage detected