Catch exceptions while retrieving repository

Ticket:	#3642