Reverted the network mock implementation to destroy mask data on error if specified