better error handling in the mocked UDP server.