Transient and permanent error management for networks-on-chip