Add error handling to the state machines post.