HOW TO SOLVE THE NETWORK ERROR WHEN USING A PATCH FUNCTION