mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
fix(line): close response body on successful SendMedia calls
Always route through classifySDKError to ensure resp.Body is closed even when the API call succeeds. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -532,8 +532,8 @@ func (c *LINEChannel) SendMedia(ctx context.Context, msg bus.OutboundMediaMessag
|
||||
To: msg.ChatID,
|
||||
Messages: []messaging_api.MessageInterface{&textMsg},
|
||||
}, "")
|
||||
if err != nil {
|
||||
return nil, classifySDKError(resp, err)
|
||||
if sdkErr := classifySDKError(resp, err); sdkErr != nil {
|
||||
return nil, sdkErr
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user