Monitor errors which have been seen

Clear errors on routing.
Move the error code to a package