analytics-go
analytics-go copied to clipboard
No error returned on empty or invalid write-key
If I set an empty or invalid write key while creating a client, it doesn't return any error. Everything goes through and no error is logged.
I tried creating client with both the below methods
1. client := analytics.New(c.Key)
2. client, err := analytics.NewWithConfig(c.Key, analytics.Config{})
But no error is returned even while calling client.Enqueue()
or client.Close()
Shouldn't the code return an error if data is not received in Segment? Or even when the client creation is incorrect.
It's assumed that data is sent unless you verify it manually, which is misleading.
@mugdha-adhav I am also getting the same issue. Not getting any error on sending empty or invalid write key and I am getting response 200 OK
in return. How you have tackled this case?