chore(sanitize): use minErr to throw exception