Skip to content

Commit

Permalink
Add error handling/messaging to GetLatestRelease
Browse files Browse the repository at this point in the history
  • Loading branch information
danudey committed Oct 20, 2023
1 parent f923419 commit 8b4204c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ghr.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ func (g *GHR) CreateRelease(ctx context.Context, req *github.RepositoryRelease,

func (g *GHR) GetLatestRelease(ctx context.Context) (*github.RepositoryRelease, error) {
release, err := g.GitHub.GetLatestRelease(ctx)
if err != nil {
return nil, fmt.Errorf("Unable to fetch latest Github release: %w", err)
}
return release, err
}

Expand Down

0 comments on commit 8b4204c

Please sign in to comment.