diff --git a/registry/machine.go b/registry/machine.go
index <HASH>..<HASH> 100644
--- a/registry/machine.go
+++ b/registry/machine.go
@@ -58,8 +58,10 @@ func (r *EtcdRegistry) GetMachineState(machID string) *machine.MachineState {
 
 // Push Machine object to etcd
 func (r *EtcdRegistry) SetMachineState(ms machine.MachineState, ttl time.Duration) (uint64, error) {
-	//TODO: Handle the error generated by marshal
-	json, _ := marshal(ms)
+	json, err := marshal(ms)
+	if err != nil {
+		return uint64(0), err
+	}
 	key := path.Join(r.keyPrefix, machinePrefix, ms.ID, "object")
 
 	// Assume state is already present, returning on success
fix(registry): tiny fix

only thing left from the splitting the hearbeat/machineState idea