changed exception thrown in Repository