Update ServiceDispatcher.java to handle errors.