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:
parent
6d7d1b0909
commit
bacb9aba7c
1 changed files with 2 additions and 2 deletions
|
|
@ -532,8 +532,8 @@ func (c *LINEChannel) SendMedia(ctx context.Context, msg bus.OutboundMediaMessag
|
||||||
To: msg.ChatID,
|
To: msg.ChatID,
|
||||||
Messages: []messaging_api.MessageInterface{&textMsg},
|
Messages: []messaging_api.MessageInterface{&textMsg},
|
||||||
}, "")
|
}, "")
|
||||||
if err != nil {
|
if sdkErr := classifySDKError(resp, err); sdkErr != nil {
|
||||||
return nil, classifySDKError(resp, err)
|
return nil, sdkErr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue