Error handling when resolving services