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

How to handle JsonResponses? or is this a bug #29

Closed
raftalks opened this issue Feb 10, 2019 · 1 comment
Closed

How to handle JsonResponses? or is this a bug #29

raftalks opened this issue Feb 10, 2019 · 1 comment

Comments

@raftalks
Copy link

I am facing this issue where if session gets expired or an exception gets thrown, the middleware FilterIfPjax::filterResponse throws the following error.

Spatie\Pjax\Middleware\FilterIfPjax::filterResponse() must be an instance of Illuminate\Http\Response, instance of Illuminate\Http\JsonResponse given

What is the best way to handle this problem? I have only noticed this issue when accessing a route using pjax call if the user session gets expired or an exception like UnauthorizedException gets thrown.

@juliangums
Copy link

@raftalks how did you solve this?

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

No branches or pull requests

2 participants