Skip to content

Conversation

mudler
Copy link
Owner

@mudler mudler commented Aug 28, 2025

Description

Otherwise these are silently absorbed in the background

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Copy link

netlify bot commented Aug 28, 2025

Deploy Preview for localai ready!

Name Link
🔨 Latest commit ccfb186
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/68b0718888224b0008245a6b
😎 Deploy Preview https://deploy-preview-6160--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

}
var buf bytes.Buffer
enc := json.NewEncoder(&buf)
enc.Encode(ev)

Check warning

Code scanning / gosec

Errors unhandled Warning

Errors unhandled
log.Debug().Msgf("Sending chunk failed: %v", err)
input.Cancel()
}
w.Flush()

Check warning

Code scanning / gosec

Errors unhandled Warning

Errors unhandled
}
respData, _ := json.Marshal(resp)

w.WriteString(fmt.Sprintf("data: %s\n\n", respData))

Check warning

Code scanning / gosec

Errors unhandled Warning

Errors unhandled
respData, _ := json.Marshal(resp)

w.WriteString(fmt.Sprintf("data: %s\n\n", respData))
w.WriteString("data: [DONE]\n\n")

Check warning

Code scanning / gosec

Errors unhandled Warning

Errors unhandled

w.WriteString(fmt.Sprintf("data: %s\n\n", respData))
w.WriteString("data: [DONE]\n\n")
w.Flush()

Check warning

Code scanning / gosec

Errors unhandled Warning

Errors unhandled
}
var buf bytes.Buffer
enc := json.NewEncoder(&buf)
enc.Encode(ev)

Check warning

Code scanning / gosec

Errors unhandled Warning

Errors unhandled

log.Debug().Msgf("Sending chunk: %s", buf.String())
fmt.Fprintf(w, "data: %v\n", buf.String())
w.Flush()

Check warning

Code scanning / gosec

Errors unhandled Warning

Errors unhandled
}
log.Error().Msgf("Stream ended with error: %v", err)
fmt.Fprintf(w, "data: %v\n", "Internal error: "+err.Error())
w.Flush()

Check warning

Code scanning / gosec

Errors unhandled Warning

Errors unhandled
@mudler mudler added the enhancement New feature or request label Aug 28, 2025
@mudler mudler merged commit ad99399 into master Aug 28, 2025
29 checks passed
@mudler mudler deleted the fix/error_handling_stream_completion branch August 28, 2025 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant