From 2bb14c179412334721ebaeb847a370828b659f28 Mon Sep 17 00:00:00 2001 From: Asaf Gartner Date: Mon, 30 May 2022 21:52:13 +0300 Subject: [PATCH] Replaced panic with error --- src/discord/message_handling.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/discord/message_handling.go b/src/discord/message_handling.go index 57f05684..26842471 100644 --- a/src/discord/message_handling.go +++ b/src/discord/message_handling.go @@ -448,7 +448,7 @@ func downloadDiscordResource(ctx context.Context, url string) ([]byte, string, e content, err := io.ReadAll(res.Body) if err != nil { - panic(err) + return nil, "", err } return content, res.Header.Get("Content-Type"), nil