Updated in-memory variant example

Observe returns a variant and an error.