If you are pairing the device using the SmartThings “Classic” mobile app, then the device handler has no effect on whether a device pairs or not. Do NOT blame the device handler.
Also, do not try to pair Xiaomi / Aqara devices using the new SmartThings Samsung Connect mobile app. It will not work.
If you are having troubles pairing a Xiaomi / Aqara device, there are a number of reasons why this may be true. The first reason to remember is that Xiaomi / Aqara devices are designed to work with a Xiaomi / Aqara Gateway hub. They are not guaranteed to work with other hubs, but many people have managed to get them to work. See this post for more information on other reasons for difficulty in pairing / keeping Xiaomi / Aqara devices connected.