Closed ce-kkoziel closed 2 years ago
I can give you some hint:
The RestLogFilter
replaces the Reponse.Body from the default 'stream to http directly' to a buffered memory stream so we can save the result in request.ResponseBody =
.
For some reason looks like context.HttpContext.Items[OriginalResponseStreamKey]
is not found.
Maybe OnActionExecuting
didn't execute?
Hi @ce-kkoziel any progress with this?
Hi @olmobrutall. You are right, I discover OnActionExecuting
was not executed. But it means RestLogFilter does not handle requests which do not match to endpoint requirements (ModelState is invalid). Instead of that behavior it generates Exception like in issue. Currently, framework do not allow to log any info about rejected requests on model validation stage.
Currently I think CE are the only using RestLogAttribute.
since looks like you can reproduce the problem, feel free to change it to fix the current behavior.
If I had a permissions to push new branch with my fix I would make a pull request with my changes.
Permission from who? You can fork framework repo, push to you cloned repo and make PR from there
Ok, great! I will try to do in this way. :)
@olmobrutall Could you look at this exception and explain what wrong is? We are using framework from commit 18d765b6670020d13cea46110ba9ae8cec25e0c0