Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ProvisioningDeviceClient.register() exception #1195

Closed
Siecje opened this issue Sep 20, 2024 · 1 comment
Closed

Improve ProvisioningDeviceClient.register() exception #1195

Siecje opened this issue Sep 20, 2024 · 1 comment

Comments

@Siecje
Copy link

Siecje commented Sep 20, 2024

If the device client certificate has expired ProvisioningDeviceClient.register() will raise ClientError("Unexpected failure").

https://github.com/Azure/azure-iot-sdk-python/blob/62690bd999c918caccaf900d3d9c78f3a707cdef/azure-iot-device/azure/iot/device/provisioning/aio/async_provisioning_device_client.py#L46C20-L46C59

The original exception is more useful. ServiceError("register request returned a service error status code 401")

@ryanwinter
Copy link
Contributor

Thanks for the feedback @Siecje, at this time we only focused on stability and security related fixes, but we will add this to our internal backlog for consideration in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants