mfucci / node-matter

Matter protocol client / server for node.js
Apache License 2.0
119 stars 10 forks source link

Really check for Statuscode errors and return Error classes #247

Closed Apollon77 closed 1 year ago

Apollon77 commented 1 year ago

This PR uses the new Error classes to instoduce StatusError classes that are thrown when an unexpected StatusCode is returned.

This also fixes the "waitForSucces" to really wait for a success reswponse and not for "any" response

Apollon77 commented 1 year ago

Ok, I checked more in deoth the throwIfError and waitForSuccess and optimized more ... hopefully now less "duplicate" code

Apollon77 commented 1 year ago

@mfucci Ready for re-reveiw ... I adjusted ... you were right regarding duplicste throwIfError

Apollon77 commented 1 year ago

Ready for re-review