Fix raised exception if repository cannot be found