That you got the "MCPasscodeErrorDomain" response shows the Meraki SM sent the command successfully to the device, and that the device received it, but couldn't action it.
Getting the inability to do any further commands against the device would imply that there was a deeper issue with the device itself. Whilst brutal, resetting it appears to have been the only resolution.