google/triage-party

panic: nil dereference in GithubProvider.getResponse()

briandealwis opened this issue · 0 comments

runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xb25f07]
at github.com/google/triage-party/pkg/provider.(*GithubProvider).getResponse (github.go:64)
at github.com/google/triage-party/pkg/provider.(*GithubProvider).IssuesListByRepo (github.go:81)
at github.com/google/triage-party/pkg/hubbub.(*Engine).updateIssues (issue.go:87)
at github.com/google/triage-party/pkg/hubbub.(*Engine).cachedIssues (issue.go:46)
at github.com/google/triage-party/pkg/hubbub.(*Engine).SearchIssues.func1 (search.go:66)

The problem seems to be here:

func (p *GithubProvider) IssuesListByRepo(ctx context.Context, sp SearchParams) (i []*Issue, r *Response, err error) {
opt := p.getIssueListByRepoOptions(sp)
gi, gr, err := p.client.Issues.ListByRepo(ctx, sp.Repo.Organization, sp.Repo.Project, opt)
i = p.getIssues(gi)
r = p.getResponse(gr)
return

It looks like the go-github returns nil pointers for requests that error.