Here are the steps to setup to setup thank you and error page -:
Step 1: Go to Membership >> Dashboard
Step 2: Under membership, navigate to Settings. Then click on the Connect Payment Gateway and then on PayPal.
Step 3: Set your Failed and Error pages as illustrated and click save