err can be a string