rgeniesse / sensu-pushbullet-handler

A Sensu handler plugin for sending notifications via Pushbullet
MIT License
0 stars 0 forks source link

Crashes if single device not found #14

Open rgeniesse opened 5 years ago

rgeniesse commented 5 years ago

Error:

panic: Device not found

goroutine 1 [running]:
main.notifyPushbulletOne(0xc00013a6c0, 0x0, 0x0)
    /Users/rgeniesse/go/src/sensu-pushbullet-handler/main.go:142 +0x284
main.run(0xc000173680, 0xc0000c3e00, 0x0, 0x4, 0x0, 0x0)
    /Users/rgeniesse/go/src/sensu-pushbullet-handler/main.go:96 +0x289
sensu-pushbullet-handler/vendor/github.com/spf13/cobra.(*Command).execute(0xc000173680, 0xc0000ca010, 0x4, 0x4, 0xc000173680, 0xc0000ca010)
    /Users/rgeniesse/go/src/sensu-pushbullet-handler/vendor/github.com/spf13/cobra/command.go:762 +0x473
sensu-pushbullet-handler/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc000173680, 0x23, 0xc000173680, 0xc0001ba300)
    /Users/rgeniesse/go/src/sensu-pushbullet-handler/vendor/github.com/spf13/cobra/command.go:852 +0x2fd
sensu-pushbullet-handler/vendor/github.com/spf13/cobra.(*Command).Execute(0xc000173680, 0x0, 0x177b381)
    /Users/rgeniesse/go/src/sensu-pushbullet-handler/vendor/github.com/spf13/cobra/command.go:800 +0x2b
main.main()
    /Users/rgeniesse/go/src/sensu-pushbullet-handler/main.go:24 +0x2b
rgeniesse commented 5 years ago

Most likely related to #10