Logging or intercepting an "invalid json" response

Hi,

I have an application deployed on WebSphere Portal and I’m getting intermitent errors showing an invalid JSON response.
It seems to be related to certain customers or certain networks, but I haven’t been able to pinpoint the exact cause.

I’ve tried to use chrome’s f12 developer tools to find out what the server’s response was, but I haven’t been able to do it.

Is there a way to log or find out exactly what the server’s response was that caused the error?

Thank you.

Same problem here, we use LTPA tokens with JAAS form login. After LTPA token expires server is sending default login-error page instead of JSON. How to handle invalid json? Is it possible on server side? There is no error event. Java session listener does not detect LTPA expiration.