Azure / Azure/azure-iot-sdk-csharp

IoT Hub quota exceeded is not reported properly

Open
#2,455 0 comments 0 reactions 1 assignee Claimed by @vighatke View on GitHub
bug IoTSDK
Dominant language
C#
Stars
477
Forks
492
Avg merge
9h 55m
Merged PRs (30d)
2

Description

# Context

- **OS, version, SKU and CPU architecture used:** Windows 10 Desktop x64
- **Application's .NET Target Framework :** net6.0, netcoreapp3.1
- **SDK version used:** Microsoft.Azure.Device.Client 1.33.1

## Description of the issue
We use an instance of the Microsoft.Azure.Devices.ServiceClient class to invoke the direct methods and send the messages back to the devices. When the IoT Hub quota is exceeded and we call SendAsync() method on the service client instance then we get an exception. Unfortunately the Code property of the exception is set to InvalidErrorCode. But it should be set to IotHubQuotaExceeded. It was set to proper value in the past but now we see it's not working as expected. Btw, the message of the exception is set properly. But we can't do the decision based on it. We check a value of the Code property. Could you please look into it?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.