Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhook Configuration #10

Merged
merged 10 commits into from
Jun 14, 2024
Merged

Webhook Configuration #10

merged 10 commits into from
Jun 14, 2024

Conversation

AugustMiller
Copy link
Contributor

@AugustMiller AugustMiller commented Jun 10, 2024

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…

  • …cleans up the Webhook settings screen messaging, and switches to a UserException so that the error is surfaced when running with devMode off (see “Breaking Changes,” below);
  • …narrows the scope of CSRF changes in the webhooks controller to preserve them for other CP requests;
  • …adjusts some Prettier settings so GitHub stops complaining;

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.

@lukeholder lukeholder requested a review from i-just June 13, 2024 05:46
Copy link
Contributor

@i-just i-just left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks August! All looks good.

Both this and PR#9 probably warrant a new minor release (not patch).

@i-just i-just merged commit d14de28 into 1.x Jun 14, 2024
5 checks passed
@i-just i-just deleted the bugfix/webhook-instructions branch June 14, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants