craftcms / stripe

Sync and extend Stripe products and subscriptions.
MIT License
5 stars 2 forks source link

Webhook Configuration #10

Closed AugustMiller closed 5 months ago

AugustMiller commented 5 months ago

I encountered an error when saving users prior to configuring the plugin:

  1. Install plugin;
  2. Create/save/register a user;
  3. Observe error;

This catches errors thrown by the Stripe API and only queues the sync job when it can be reached.

Additionally, it…

Breaking Changes?

I swapped out the yii\base\InvalidConfigException for yii\web\ServerErrorHttpException so that the error message would be surfaced to the user (as a subclass of yii\base\UserException) when devMode is off.

If another extension were to try and catch this somewhere (?), their functionality might break if they weren't using a more relaxed parent class like yii\base\Exception.