MCPcopy Index your code
hub / github.com/coder/coder / appendError

Method appendError

coderd/healthcheck/workspaceproxy.go:112–120  ·  view source on GitHub ↗

appendError appends errs onto r.Error. We only have one error, so multiple errors need to be squashed in there.

(es ...string)

Source from the content-addressed store, hash-verified

110// appendError appends errs onto r.Error.
111// We only have one error, so multiple errors need to be squashed in there.
112func (r *WorkspaceProxyReport) appendError(es ...string) {
113 if len(es) == 0 {
114 return
115 }
116 if r.Error != nil {
117 es = append([]string{*r.Error}, es...)
118 }
119 r.Error = ptr.Ref(strings.Join(es, "\n"))
120}
121
122// calculateSeverity returns:
123// health.SeverityError if all proxies are unhealthy,

Callers 2

RunMethod · 0.95

Calls 1

RefFunction · 0.92

Tested by 1