From e4de485bda46ca8014d1ad9ee745e6acae377d9f Mon Sep 17 00:00:00 2001 From: StealWonders <6114858+StealWonders@users.noreply.github.com> Date: Mon, 4 Mar 2024 20:43:01 +0100 Subject: [PATCH] adds error handling --- internal/graphql/resolvers/helper.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/graphql/resolvers/helper.go b/internal/graphql/resolvers/helper.go index 1b58e46..8685a87 100644 --- a/internal/graphql/resolvers/helper.go +++ b/internal/graphql/resolvers/helper.go @@ -47,6 +47,9 @@ func (r *mutationResolver) submitImages(images []*models.ImageInput) []uuid.UUID url := r.ImageAPIURL + "submit/" + image.ID.String() request, err := http.NewRequest("POST", url, nil) if err != nil { + err = fmt.Errorf("img-service: error creating request: %v", err) + sentry.CaptureException(err) + log.Println(err) continue // ignore error and continue with the next image }