fix: return 200 response for unused handlers#6
Open
janvennemann wants to merge 2 commits into
Open
Conversation
Owner
|
Hey @janvennemann thanks for submitting this. I'd argue that the other events should be disabled in the Clerk dashboard if there is no intention to handle them. The reason I opted to return a non-success code on unconfigured events is to prevent false successes in the dashboard. If an event is enabled in the Clerk dashboard, but not configured in the handler, it will still show that the message was processed successfully in the dashboard even if nothing is being done with it. |
Author
|
Thanks, that makes total sense. Someone else did the initial setup in the project so i didn't know about that feature in the Clerks dashboard. After updating the subscribed events for the webhook everything works flawlessly. You can close this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We are using this package but only require one of the handlers currently. For all other events this package currently return a 404 error. This will cause Clerk to repeatedly retry the event, although we are not interested in it. It will also mark a lot of request as failed.
To avoid unnecessary retries this package should not return an error response in case the event isn't handled.