Improve logs and fix things with avatar reuploads

This commit is contained in:
Tulir Asokan
2023-06-17 19:37:08 +03:00
parent 00465bb715
commit 3247709abb
3 changed files with 14 additions and 16 deletions

View File

@@ -44,7 +44,7 @@ func downloadDiscordAttachment(url string) ([]byte, error) {
defer resp.Body.Close()
if resp.StatusCode > 300 {
data, _ := io.ReadAll(resp.Body)
return nil, fmt.Errorf("unexpected status %d: %s", resp.StatusCode, data)
return nil, fmt.Errorf("unexpected status %d downloading %s: %s", resp.StatusCode, url, data)
}
return io.ReadAll(resp.Body)
}