fix(phase-4): add DB error checking, mask sensitive auth tokens in API and middleware logs
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled

This commit is contained in:
newkirk
2026-07-21 13:23:02 -04:00
parent 700b7cd5d6
commit a187d8e20e
4 changed files with 39 additions and 13 deletions
+2 -5
View File
@@ -113,14 +113,11 @@ func (p *DeepSeekProvider) ChatCompletion(ctx context.Context, req *models.Unifi
}
if !resp.IsSuccess() {
var msg string
if resp.RawBody() != nil {
msg := resp.String()
if msg == "" && resp.RawBody() != nil {
bodyBytes, _ := io.ReadAll(resp.RawBody())
msg = string(bodyBytes)
}
if msg == "" {
msg = resp.String()
}
return nil, fmt.Errorf("DeepSeek API error (%d): %s", resp.StatusCode(), msg)
}