The new HandlesOAuthErrors middleware is unable to actually handle errors, because Laravel intercepts Exceptions of the final destination of the middleware pipeline:
see also my comment in the PR introducing the middleware: https://github.com/laravel/passport/pull/937#issuecomment-519923621
Attempt to use Passport within a Laravel application and open /oauth/authorize with an invalid client_id. You'll see an HTTP 500 instead of a proper JSON response explaining the issue.
The PR for this was merged into master.
I'm still getting a generic error on passport 8.0
Most helpful comment
I'm still getting a generic error on passport 8.0