Homekit app terminates connection for no reason

I am completely new to Apple, never even owned an iPhone. But despite this I'm creating a bridge accessory- this doesn't require me to be familiar with Apple. My implementation works fine, except for some cases for which the HomeKit app just terminates the connection with my accessory during pairing for no reason whatsoever. Is there any way i can get any info on why it does that? The OS on the iPhone I'm using to test is 11.4.0