MCPcopy
hub / github.com/mudler/LocalAI / Err

Method Err

core/services/nodes/managers_distributed.go:106–117  ·  view source on GitHub ↗

Err returns a non-nil error aggregating per-node hard failures (Status == "error"). Queued nodes (waiting for reconciler retry) are not failures — surfacing them as errors would mislead users about durable intent. Used by Install/Upgrade/Delete so reply.Success=false from workers reaches OpStatus.Er

()

Source from the content-addressed store, hash-verified

104// workers reaches OpStatus.Error and the UI, instead of being silently
105// dropped on the way up.
106func (r BackendOpResult) Err() error {
107 var failures []string
108 for _, n := range r.Nodes {
109 if n.Status == galleryop.NodeStatusError {
110 failures = append(failures, fmt.Sprintf("%s: %s", n.NodeName, n.Error))
111 }
112 }
113 if len(failures) == 0 {
114 return nil
115 }
116 return errors.New(strings.Join(failures, "; "))
117}
118
119// enqueueAndDrainBackendOp is the shared scaffolding for
120// delete/install/upgrade. Every non-pending node gets a pending_backend_ops

Callers 15

AudioTranscriptionMethod · 0.80
AudioTranscriptionMethod · 0.80
feedSlicesMethod · 0.80
computeSourceTotalsFunction · 0.80
SendAudioMethod · 0.80
triggerResponseAtTurnFunction · 0.80

Calls

no outgoing calls

Tested by 1

EnsureRemoteMethod · 0.64