Skip to content

Commit

Permalink
adds error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
StealWonders committed Mar 4, 2024
1 parent 42906df commit e4de485
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/graphql/resolvers/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit e4de485

Please sign in to comment.