Avoid endless server error loops and add message to log.