Fix task.
Update finite_machine.
Add new error type.
Add coverage.
Change to use new error type.