Skip to content

Commit

Permalink
err
Browse files Browse the repository at this point in the history
  • Loading branch information
Allyson-English committed Jan 30, 2025
1 parent 2942f71 commit 8176d29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion internal/services/cio/cio.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ func (s *Service) SoftwareDisconnectionEvent(ctx context.Context, vehicleID uint
})
if err != nil {
s.logger.Err(err).Str("wallet_address", common.Bytes2Hex(address)).Msg("failed to get account by wallet address from accounts api")
return err
}

return s.client.Enqueue(
analytics.Identify{
UserId: account.Id,
UserId: account.GetId(),
Traits: analytics.NewTraits().Set("integration_id", integrationID).Set("vehicle_id", vehicleID),
},
)
Expand Down
3 changes: 2 additions & 1 deletion internal/services/task_status_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ func (i *TaskStatusListener) processSmartcarPollStatusEvent(event *shared.CloudE

vehicleID, ok := udai.R.UserDevice.TokenID.Uint64()
if !ok {
i.log.Err(errors.New("failed to parse vehicle token id for cio event"))
err := errors.New("failed to parse vehicle token id for cio event")
i.log.Err(err).Str("userDeviceID", userDeviceID).Str("integrationID", integrationID).Msg("invalid vehicle id")
}

return i.cioSvc.SoftwareDisconnectionEvent(ctx, vehicleID, udai.R.UserDevice.OwnerAddress.Bytes, integrationID)
Expand Down

0 comments on commit 8176d29

Please sign in to comment.