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
Handling errors and exceptions in a way that provides useful context can be challenging, especially when dealing with third-party libraries or PHP errors that are not caught within your own code.
The Slim 4 ErrorMiddleware is able to catch TypeError because it's extended from Throwable. So when you add the ErrorMiddleware as last middleware, it will also catch this kind of exceptions from any third-party libraries.
Besides Throwable PHP has its older error level system of "errors".
To "catch" these types of PHP errors, you may add a custom middleware.
But to get a deeper understanding, we need more context and an example of what's the actual problem is. I would suggest you post a minimal example to demonstrate your specific use case. Then explain what is the current behavior and what is the "expected" behavior. I hope that we can find a solution.
I'm just mentioning #3250 since it was closed before the correct understanding of the problem so it can be reviewed again and maybe reopened.
The text was updated successfully, but these errors were encountered: