Microsoft.AspNetCore.Mvc.Internal.AmbiguousActionException : Multiple actions matched. The following actions matched route data and had all constraints satisfied:
GitHubCoreReceiver.Controllers.GitHubController.GitHubHandler (GitHubCoreReceiver)
GitHubCoreReceiver.Controllers.GitHubController.FallbackHandler (GitHubCoreReceiver)
This issue is not specific to the GitHub receiver. Instead, it's an unintended side effect of using the same constraint (WebHookReceiverNameConstraint) for both [GeneralWebHook] and receiver-specific attributes.
Fix is to reduce the Order of the WebHookReceiverNameConstraint when adding it for a receiver-specific attribute.
Self-assigning because I'd otherwise need to work around this issue in my #290 efforts. That workaround would then need to be removed once we fix this.
With the following WebHook actions
A request to https://localhost/api/webhooks/incoming/github should match the
GitHubHandler(...)
action. Instead, the request results in an error:This issue is not specific to the GitHub receiver. Instead, it's an unintended side effect of using the same constraint (
WebHookReceiverNameConstraint
) for both[GeneralWebHook]
and receiver-specific attributes.Fix is to reduce the
Order
of theWebHookReceiverNameConstraint
when adding it for a receiver-specific attribute.