EngineeringKiosk / GermanTechPodcasts

A curated list of German Tech Podcasts 🇩🇪 🇦🇹 🇨🇭
https://engineeringkiosk.dev/deutsche-tech-podcasts/
MIT License
133 stars 34 forks source link

Fix panic: runtime error: invalid memory address or nil pointer dereference #152

Closed andygrunwald closed 1 year ago

andygrunwald commented 1 year ago

We can't assume that the status code is part of the response in an error case. See run: https://github.com/EngineeringKiosk/GermanTechPodcasts/actions/runs/3675245809/jobs/6214430653

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9514f1]

goroutine 1 [running]:
github.com/EngineeringKiosk/GermanTechPodcasts/cmd.cmdCollectPodcastData(0xd4dc60?, {0x9f635e?, 0x4?, 0x6?})
    /home/runner/work/GermanTechPodcasts/GermanTechPodcasts/app/cmd/collectPodcastData.go:117 +0xdf1
github.com/spf13/cobra.(*Command).execute(0xd4dc60, {0xc00006c300, 0x6, 0x6})
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:916 +0xbf5
github.com/spf13/cobra.(*Command).ExecuteC(0xd4e500)
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x5fb
github.com/spf13/cobra.(*Command).Execute(...)
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
github.com/EngineeringKiosk/GermanTechPodcasts/cmd.Execute()
    /home/runner/work/GermanTechPodcasts/GermanTechPodcasts/app/cmd/root.go:24 +0x72
main.main()
    /home/runner/work/GermanTechPodcasts/GermanTechPodcasts/app/main.go:6 +0x25