MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / errorEventBody

Function errorEventBody

sdk/cliproxy/auth/error_events.go:140–151  ·  view source on GitHub ↗
(err *Error)

Source from the content-addressed store, hash-verified

138}
139
140func errorEventBody(err *Error) string {
141 if err == nil {
142 return "request failed"
143 }
144 if msg := strings.TrimSpace(err.Message); msg != "" {
145 return msg
146 }
147 if msg := strings.TrimSpace(err.Error()); msg != "" {
148 return msg
149 }
150 return "request failed"
151}
152
153func timePtrIfSet(value time.Time) *time.Time {
154 if value.IsZero() {

Callers 1

buildErrorEventPayloadFunction · 0.85

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected