siphomateke / zra-helper

A browser extension that automates various aspects of the ZRA website.
Other
0 stars 1 forks source link

Session expiry is not handled and causes errors #142

Open siphomateke opened 5 years ago

siphomateke commented 5 years ago

Version WIP ledger branch

Describe the bug If HTTP requests take too long to timeout, the ZRA website expires the login session causing all sorts of errors.

When the session expires, the ZRA website returns an HTML page containing "Your Session has expired. Please login again." Since this isn't a failed request, the tool doesn't treat it as such and various errors occur, particularly when an XML response was expected.

To Reproduce Steps to reproduce the behavior:

  1. Set a very long HTTP request timeout
  2. Run the action that gets ledger records
  3. Observe that the following error occurs:
    TypeError: response['request-params'] is undefined

Expected behavior When the session expires, the tool should detect this, re-login and continue.