fix(messages_list): prevent panic on failed attachment download (#660)
This commit is contained in:
parent
73f8ccaba6
commit
07914616af
1 changed files with 1 additions and 0 deletions
|
|
@ -497,6 +497,7 @@ func (ml *messagesList) openAttachment(attachment discord.Attachment) {
|
|||
resp, err := http.Get(attachment.URL)
|
||||
if err != nil {
|
||||
slog.Error("failed to fetch the attachment", "err", err, "url", attachment.URL)
|
||||
return
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue