opened
atakacs
username_0
Using invalid credentials (or an account without any installation (e. g. haven't yet accepted invitation) gives a somewhat confusing error:

    Traceback (most recent call last):
      File "/srv/homeassistant/bin/vsure", line 10, in <module>
        sys.exit(main())
      File "/srv/homeassistant/lib/python3.7/site-packages/verisure/__main__.py", line 214, in main
        session.login()
      File "/srv/homeassistant/lib/python3.7/site-packages/verisure/session.py", line 95, in login
        self._giid = self.installations[0]['giid']

Thanks for writing this software!
Invalid credentials gives confusing error
issue
created
persandstrom
username_1
Hi @username_0 

When I an invalid username/password I get the following error:

```
 File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/per/python-verisure/verisure/__main__.py", line 266, in <module>
    main()
  File "/home/per/python-verisure/verisure/__main__.py", line 214, in main
    session.login()
  File "/home/per/python-verisure/verisure/session.py", line 90, in login
    self._create_cookie()
  File "/home/per/python-verisure/verisure/session.py", line 120, in _create_cookie
    raise ResponseError(response.status_code, response.text)
verisure.session.ResponseError: Invalid response, status code: 401 - Data: {"errorGroup":"UNAUTHORIZED","errorCode":"AUT_00004","errorMessage":"Invalid username/password/authentication method combination"}
```

Do you use the latest version?
comment
created
atakacs
username_0
I ran it on 1.5.2. Doesn't look like anything related to this has changed since but I may have missed something.
comment