aiohomekit
aiohomekit copied to clipboard
Add more checking of result from device
The HAP client should raise if the status code is outside the 200 range. It should preserve the body in the exception - for example a 400 maybe accompanied by JSON with a status code, or a TLV with an error code. The higher level abstraction might still want to parse this and surface it to the user via a higher level error.
The secure session and pairing code in particular should not tolerate empty payloads.