fix if no object for error routes is defined