Update pkg/channels/wecom/app.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
mattn 2026-03-05 21:20:40 +09:00 committed by GitHub
parent ca4e44bd0f
commit ee2ebc8bf3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -323,7 +323,7 @@ func (c *WeComAppChannel) uploadMedia(ctx context.Context, accessToken, mediaTyp
if resp.StatusCode != http.StatusOK {
respBody, err := io.ReadAll(resp.Body)
if err != nil {
return "", fmt.Errorf("reading wecom upload error response: %w", err)
return "", channels.ClassifySendError(resp.StatusCode, fmt.Errorf("reading wecom upload error response: %w", err))
}
return "", channels.ClassifySendError(resp.StatusCode, fmt.Errorf("wecom upload error: %s", string(respBody)))
}