-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Action Filters returns an empty body in asp.net-core 2.0 #7214
Comments
I changed |
Wait, never mind, this is an action filter not an exception filter. |
It's expected that setting
OR
Should mark the action as successful. Do you have a repro project you can share for this? |
@rathorer solution worked! @rynowak I'll create a repro where having Thanks for the help, we can now do proper validation for the forms. :) |
@jernejk, have you got a chance to prepare a sample repro project so we can investigate it? |
Hi. We're closing this issue as no response or updates have been provided in a timely manner and we have been unable to reproduce it. If you have more details and are encountering this issue please add a new reply and re-open the issue. |
I have same problem as #5594 and the potential fix doesn't work.
When Result is set, status code is changed (422) but response is empty.
I tried different combinations of setting up the
actionExecutedContext.Exception
andactionExecutedContext.ExceptionHandled
.Initial code:
As well as suggested workaround:
It works as expected on
OnActionExecuting
:Edit:
The
ValidationException.Errors
isDictionary<string, IEnumerable<string>>
so that JSON structure is consistent withactionContext.ModelState
.The text was updated successfully, but these errors were encountered: