security configurations often respond per default with a 302 when login is needed (e.g. after a session timeout)
If a redirect happens on a request to "/zkau" an HTML document is often responded. As a result the user is presented with a technical error message. Even seasoned developers struggle to understand the meaning of these often cryptic error messages - often wasting time with unnecessary debugging.
"The server is temporarity out of service Would you like try again? (Unexpected token <(SyntaxError)) "
A more meaningful error message:
The Response could not be parsed: Expected format JSON (please check console for details)
Then print some information into the console e.g. the starting 100chars of the invalid response. And a link to a wiki page with common causes for this (most likely incorrect security redirect configuration).
This is often related with security config (often SSO integration) ... ZK-4175 was posted to provide a more reliable redirect handling. However similar parse errors can occur
Also setting/testing response headers can help to identify the content type of the response, if not ZK's expected format.