Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an error filter that catches exceptions and transforms them into IOperationResult #50

Open
4 tasks
Carl-Hugo opened this issue May 31, 2019 · 1 comment

Comments

@Carl-Hugo
Copy link
Member

Carl-Hugo commented May 31, 2019

  • Create the filter in ForEvolve.OperationResults.AspNetCore (review this, maybe creating a standalone project would be best?)
  • Allow the configuration of ExceptionTransformer that could map specific exception type(s) to an IOperationResult allowing customization of the exception convention pipeline. This could be based on, use, or update the concepts of IOperationResultStandardizer.
  • The ExceptionTransformer should support returning any type, no just IOperationResult, making this compatible with any system (including, but not limited to, my old DynamicInternalServerError projcet).
  • Add the filter to the AddForEvolveOperationResultFilters() extension method or create an AddForEvolveOperationResultApiFilters() method to differentiate API filters vs MVC filters (or both); TODO: review/rename these to be more generic and less "OperationResult-centric".

OperationResult-centric stuff could be part of another assembly, following an assembly structure similar to:

  • ForEvolve.ExceptionFilters.Abstraction
  • ForEvolve.ExceptionFilters.AspNetCore ( or ForEvolve.ExceptionFilters.AspNet)
  • ForEvolve.ExceptionFilters.AspNetCore.OperationResults
  • ForEvolve.ExceptionFilters.AspNetCore.DynamicInternalServerError (maybe?)
  • ForEvolve.ExceptionFilters.MediatR (or ForEvolve.ExceptionFilters.VerticalSlice)
  • ForEvolve.ExceptionFilters.MediatR.OperationResults
  • ForEvolve.ExceptionFilters.MediatR.DynamicInternalServerError (maybe?)
  • ...
@Carl-Hugo
Copy link
Member Author

OperationResults is moving to another repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant