refactor: prefer anonymous clients

This commit is contained in:
James Houlahan
2020-04-08 12:51:16 +02:00
parent b01be382fc
commit 5bf4d9c6f5
2 changed files with 4 additions and 9 deletions

View File

@ -65,7 +65,7 @@ func GetLogEntry(packageName string) *logrus.Entry {
func HandlePanic(cfg *Config, output string) {
if !cfg.IsDevMode() {
// TODO: Is it okay to just create a throwaway client like this?
c := pmapi.NewClientManager(cfg.GetAPIConfig()).GetClient("no-user-id")
c := pmapi.NewClientManager(cfg.GetAPIConfig()).GetAnonymousClient()
defer c.Logout()
if err := c.ReportSentryCrash(fmt.Errorf(output)); err != nil {