func fetchDevices(api *gen.ClientWithResponses) (map[string]gen.DeviceGet, error) {
    log.Info("Fetching devices...")

    resp, err := api.GetDevicesWithResponse(context.Background())
    if err != nil {