Update sdk/api/handlers/claude/code_handlers.go

thank you gemini

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
teeverc
2025-12-12 00:26:01 -08:00
committed by GitHub
parent 1215c635a0
commit 5ab3032335

View File

@@ -250,10 +250,7 @@ func (h *ClaudeCodeAPIHandler) forwardClaudeStream(c *gin.Context, flusher http.
// An error occurred: emit as a proper SSE error event
errorBytes, _ := json.Marshal(h.toClaudeError(errMsg))
_, _ = c.Writer.Write([]byte("event: error\n"))
_, _ = c.Writer.Write([]byte("data: "))
_, _ = c.Writer.Write(errorBytes)
_, _ = c.Writer.Write([]byte("\n\n"))
_, _ = fmt.Fprintf(c.Writer, "event: error\ndata: %s\n\n", errorBytes)
flusher.Flush()
}