 
 	private func handleGetVariable(params: SessionCommand.VariableParams, connnection: SessionConnection) {
 		do {
-			let cmd = try coder.getVariable(name: params.name, contextId: params.environmentId, clientIdentifier: connnection.id)
+			guard let cmd = try? coder.getVariable(name: params.name, contextId: params.environmentId, clientIdentifier: connnection.id) else { throw SessionError.encoding }
+			if cmd.count < 1 { logger.info("sending empty data") }
 			try worker?.send(data: cmd)
 		} catch {
 			logger.warning("error getting variable: \(error)")

		logger.info("uandle update preview called")
		do {
			let cmd = try coder.updatePreview(previewId: updateData.previewId, chunkNumber: updateData.chunkId, includePrevious: updateData.includePrevious)
			try worker?.send(data: cmd)
		} catch {
			logger.warning("error geupdating preview: \(error)")

				let message = try coder.openConnection(wspaceId: workspace.id, sessionId: sessionId!, dbhost: settings.config.computeDbHost, dbPort: settings.config.computeDbPort,
					dbuser: settings.config.dbUser, dbname: settings.config.dbName,
					dbpassword: settings.config.dbPassword)
				if message.count < 1 { logger.info(".connected sending empty data") }
				try worker!.send(data: message)
			} catch {
				logger.error("failed to send open connection message: \(error)")
