Closed pnegahdar closed 2 years ago
Hi @pnegahdar , thanks for reporting this! I have a PR open (https://github.com/amplitude/analytics-go/pull/49) for fixing this, will update once the fix is merged and released.
Fixed in https://pkg.go.dev/github.com/amplitude/analytics-go@v0.0.12, closing this, thank you for reporting this issue again!
Expected Behavior
Don't panic and kill application when Analytics sdk fails to connect/resolve amplitude.
Current Behavior
Application panics when it cannot resolve api2.amplitude.com.
Possible Solution
Should be straight forward to find that nil pointer with the stack above. Happy to help if needed.
Steps to Reproduce
Try blackholing
api2.amplitude.com
in /etc/hosts or just fix the nil pointer blindly.Environment