This issue is related to Issue 916: http://aspnetwebstack.codeplex.com/workitem/916, in which case the try-catch structure (in GetCorsPolicyProvider) hides the action selection failure not for a good reason. The try-catch structure doesn’t try to log the issue or provider warning message but swallow the error by fall back to default policy provider.
I’m wondering in what scenario this fall back is valuable, because if an action is not able to be located at preflight stage it is problematic at later stage.
The codes also represent an anti-pattern: using try-catch for flow control.
Comments: The current behavior is falling back to global policy if it exists, otherwise, fall back to 400 request.
I’m wondering in what scenario this fall back is valuable, because if an action is not able to be located at preflight stage it is problematic at later stage.
The codes also represent an anti-pattern: using try-catch for flow control.
Comments: The current behavior is falling back to global policy if it exists, otherwise, fall back to 400 request.