Skip to content

Commit

Permalink
fix: error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
StealWonders committed Feb 22, 2024
1 parent 7d24db1 commit 192afaa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/graphql/resolvers/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package resolvers

import (
"context"
"fmt"
"github.com/google/uuid"
ent "github.com/mensatt/backend/internal/database/ent"
"github.com/mensatt/backend/internal/database/ent/dish"
Expand Down Expand Up @@ -31,7 +32,7 @@ func (r *mutationResolver) rotateImage(uuid uuid.UUID, angle int) error {
defer response.Body.Close() // unhandled error

if response.StatusCode != 200 {
return err
return fmt.Errorf("img-service: error rotating image")
}

return nil
Expand Down

0 comments on commit 192afaa

Please sign in to comment.