You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to create a full Rest API, you need to override the ErrorMiddleware.
But this suppose to override the Application too because de ErrorMiddleware is added by default with too many code overriden due to "private" properties and methods.
It should be a good thing to restrict "private" properties and methods only when realy needed for security reasons or to forced code override in case of inheritance.
What's your point of view ?
The text was updated successfully, but these errors were encountered:
Hello, there are already possibilities to achieve this functionality:
Throw an exception that implements \Igni\Http\Exception\HttpException
Add custom middleware by $app->use() or register module implementing \Igni\Http\MiddlewareProvider
I was also thinking about extending ErrorMiddleware and replacing it with one defined by user if it gets registered. But this will destroy modules that are implementing OnErrorListener interface.
If you want to create a full Rest API, you need to override the
ErrorMiddleware
.But this suppose to override the
Application
too because deErrorMiddleware
is added by default with too many code overriden due to "private" properties and methods.It should be a good thing to restrict "private" properties and methods only when realy needed for security reasons or to forced code override in case of inheritance.
What's your point of view ?
The text was updated successfully, but these errors were encountered: