* Disambiguate HTTPUnauthorized on user/password validation
The HA core API usually returns 401 when the request does not
have proper authentication tokens or they have expired.
However the user/password validation endpoint may also return
401 when the given user/password is invalid.
The supervisor is currently unable to distinguish both scenarios,
and it needs to.
See https://github.com/home-assistant/supervisor/issues/2408
* Return 404 if user& password are not found/valid
* Fix test for invalid user/password
* Add yaml for snapshot services
Adds snapshot_full and snapshot_partial service descriptions.
* fixes
Added password to full & partial. Added name to partial.
* Use http status codes and add HTTP_BAD_GATEWAY constant
* Address review comments:
- using constants in tado integration
- using constant in media_player init.py
* Add and use HTTP_ACCEPTED constant
* Remove unnecessary exception re-wraps
* Preserve exception chains on re-raise
We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.
The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.
Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.
* Fix mistaken re-wrap in homematicip_cloud/hap.py
Missed the difference between HmipConnectionError and
HmipcConnectionError.
* Do not hide original error on plex new cert validation error
Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.