aiohomekit icon indicating copy to clipboard operation
aiohomekit copied to clipboard

Add more checking of result from device

Open Jc2k opened this issue 4 years ago • 0 comments

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.

Jc2k avatar Aug 03 '20 07:08 Jc2k