Include key in exception if str