mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-19 16:17:56 +00:00
fix(claude): explicitly close status HTTP response
This commit is contained in:
@@ -151,7 +151,7 @@ func (s *ClaudeResetCreditService) query(ctx context.Context, id int64) (*Claude
|
||||
if err != nil {
|
||||
return nil, nil, infraerrors.ServiceUnavailable("CLAUDE_RESET_QUERY_FAILED", "reset status request failed")
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func() { _ = resp.Body.Close() }()
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return nil, nil, infraerrors.New(http.StatusBadGateway, "CLAUDE_RESET_QUERY_FAILED", fmt.Sprintf("reset status upstream HTTP %d", resp.StatusCode))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user