Open vToMy opened 9 months ago
Just making sure, currently we already handle the PasscodeRequire
error explicitly using PasscodeRequiredError
. What you are suggesting is adding to the following map, correct?
It seems this exception is unused though? I don't see any handling
Ah, you have the DeviceHasPasscodeSetError
I recommend removing it and just catching the proper exception instead of testing for message error.
There are some common lockdown errors that would be nice to have a dedicated exception class: https://github.com/doronz88/pymobiledevice3/blob/3a6113091c59c65f4db5d318e126c09f197a994c/pymobiledevice3/lockdown.py#L532
The list is here: https://github.com/libimobiledevice/libimobiledevice/blob/04c023317f616b4b9588cce8c2da3174a7d2086b/src/lockdown.c#L57
Specificly I've encountered the following that would be helpful, if you don't want to add all of them:
PasscodeRequired
- device doesn't have passcode, and the command requires to set it first (this one is actually missing from libimobiledevice)MCProtected
- mdm blocking the commandSessionActive
- usually when trying to verify pairing twice