Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
autoupdater: fix: nil pointer dereference on non status graphQL error
If a GitHub GraphQL endpoint returned an error that is not an HTTP status error, wrapGraphQLRetryableErrors() returned nil instead of the passed error. This caused that Client.ReadyForMergeStatus() returned (nil,nil) and a nil pointer deference was done in the autoupdater. This fixes: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9293f6] goroutine 40 [running]: github.com/simplesurance/goordinator/internal/autoupdate.(*queue).updatePR(0xc0001e68f0, {0xc5b498, 0xc0000ae500}, 0xc00055e0a0) github.com/simplesurance/goordinator/internal/autoupdate/queue.go:500 +0x476 github.com/simplesurance/goordinator/internal/autoupdate.(*queue).scheduleUpdate.func1() github.com/simplesurance/goordinator/internal/autoupdate/queue.go:422 +0xd4 github.com/simplesurance/goordinator/internal/autoupdate/routines.(*Pool).worker(0xc00042eea0) github.com/simplesurance/goordinator/internal/autoupdate/routines/pool.go:92 +0x75 created by github.com/simplesurance/goordinator/internal/autoupdate/routines.NewPool github.com/simplesurance/goordinator/internal/autoupdate/routines/pool.go:39 +0x133
- Loading branch information