From 46d587d685d714fbdb54987a2db908b5a3fcdad8 Mon Sep 17 00:00:00 2001 From: Nulo Date: Sun, 13 Aug 2023 14:08:05 -0300 Subject: [PATCH] mejores errores --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 818689b..614717c 100644 --- a/main.go +++ b/main.go @@ -29,10 +29,10 @@ func (fu FileURL) NeedsUpload() bool { func (fu FileURL) UploadData() (string, io.Reader, error) { res, err := http.Get(string(fu)) if err != nil { - return "", nil, err + return "", nil, errors.Join(errors.New("error while uploading FileURL"), err) } if res.StatusCode != http.StatusOK { - return "", nil, errors.New(res.Status) + return "", nil, errors.New("error while uploading FileURL: " + res.Status) } return "url.mp4", res.Body, nil }