Replace state with an enum-like class.
Handle error on repost.