Logging more informative error message when the repository instantiation fails