Merge pull request #3034 from chengzhichao-xydt/codex/feishu-resource-close-error
fix: check Close() error on feishu resource download
This commit is contained in:
commit
ebb04abb38
2 changed files with 7 additions and 1 deletions
BIN
.gitignore
vendored
BIN
.gitignore
vendored
Binary file not shown.
|
|
@ -1013,7 +1013,13 @@ func (c *FeishuChannel) storeResourceFile(
|
|||
})
|
||||
return ""
|
||||
}
|
||||
out.Close()
|
||||
if closeErr := out.Close(); closeErr != nil {
|
||||
logger.ErrorCF("feishu", "Failed to close downloaded resource file", map[string]any{
|
||||
"error": closeErr.Error(),
|
||||
})
|
||||
os.Remove(localPath)
|
||||
return ""
|
||||
}
|
||||
|
||||
ref, err := store.Store(localPath, media.MediaMeta{
|
||||
Filename: filename,
|
||||
|
|
|
|||
Loading…
Reference in a new issue