I have an existing mobile-app API based on Laravel 5.2.
I make a request against an endpoint which passes the request through several Middleware classes after which it arrives at a controller that sends it to a service class that throws an exception.
My problem is that instead of the Issues page in Sentry showing the exception as originating in the service class it shows it as originating in one of the Middleware classes (you’ll notice in the below pic that it seems all my exceptions originate in the same class even though in the code they do not)
Also, when drilling down into a single issue view, the App Only exception display also makes it look like the exception originated in the Middleware class but when I switch the exception display to Full it is clearly shown the exception actually originated in the service class I mentioned before.
(I have screenshots of those views as well, I will upload them in the comments if it helps)
The fact the Issues view misrepresents the actual source of an exception is making it a lot less practical, to me, than it should be.
Has anyone seen this problem before?
Can anyone advise on how to solve this?
P.S. I hope this is in the correct category, I apologize if I made a mistake.