blockonomics/woocommerce-plugin

Error Handling

blockonomics opened this issue · 1 comments

Summary

New address generation may throw various errors like store not configured/account disabled / gap limit / wrong api key / network error. We need a proper way to handle and display these

How to handle

Customer of shop should never we bothered with technical error because he doesn't know what to do. We should always say Note to webmaster: Please login to your admin panel, navigate to Settings > Blockonomics > Currencies and click <i>Test Setup</i> to diagnose the issue. on checkout

Complications / Exceptions

  1. Duplicate address error
  2. Temporary Network errors - Merchant server somehow can't reach our server
  3. Gap limit error - The complication here is that Test Setup will never show gap limit error because it always works in reset=1 mode
    Both 1 and 3 should be fixed on server side and will take sometime

Temporary Solution

Lets show the following message for all cases (BCH and BTC):

Unable to generate address (This may be a temporary error. Please try again)

If this continues, please ask website administrator to do following:

  • Login to admin panel, navigate to Settings > Blockonomics > Currencies and click Test Setup to diagnose the exact issue
  • Check blockonomics registered email address for error messages

Testing sheet

We need to create a comprehensive testing sheet for all different kind of errors and how to reproduce and test them