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

Update service error codes #3316

Merged
merged 2 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions iothub/service/src/Exceptions/IotHubServiceErrorCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@ public enum IotHubServiceErrorCode

// Throttling Exception

/// <summary>
/// IoT hub throttling limits have been exceeded for the requested operation.
/// For more information, <see href="https://aka.ms/iothubthrottling">IoT hub quotas and throttling</see>.
/// </summary>
GenericTooManyRequests = 429000,

/// <summary>
/// IoT hub throttling limits have been exceeded for the requested operation.
/// <para>
Expand All @@ -232,6 +238,14 @@ public enum IotHubServiceErrorCode
/// </summary>
ThrottlingException = 429001,

/// <summary>
/// IoT hub throttling limits have been exceeded for the requested operation.
/// <para>
/// For more information, see <see href="https://aka.ms/iothubthrottling">IoT hub quotas and throttling</see>.
/// </para>
/// </summary>
ThrottleBacklogLimitExceeded = 429002,

/// <summary>
/// IoT hub throttling limits have been exceeded for the requested operation.
/// <para>
Expand All @@ -240,6 +254,18 @@ public enum IotHubServiceErrorCode
/// </summary>
ThrottlingBacklogTimeout = 429003,

/// <summary>
/// IoT hub throttling limits have been exceeded for the requested operation.
/// For more information, <see href="https://aka.ms/iothubthrottling">IoT hub quotas and throttling</see>.
/// </summary>
ThrottlingMaxActiveJobCountExceeded = 429004,

/// <summary>
/// IoT hub throttling limits have been exceeded for the requested operation.
/// For more information, <see href="https://aka.ms/iothubthrottling">IoT hub quotas and throttling</see>.
/// </summary>
DeviceThrottlingLimitExceeded = 429005,

// InternalServerError - 500

/// <summary>
Expand Down
4 changes: 4 additions & 0 deletions iothub/service/src/Exceptions/IotHubServiceException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,12 @@ private static bool DetermineIfTransient(HttpStatusCode statusCode, IotHubServic
{
IotHubServiceErrorCode.IotHubQuotaExceeded
or IotHubServiceErrorCode.DeviceNotOnline
or IotHubServiceErrorCode.GenericTooManyRequests
or IotHubServiceErrorCode.ThrottlingException
or IotHubServiceErrorCode.ThrottleBacklogLimitExceeded
or IotHubServiceErrorCode.ThrottlingBacklogTimeout
or IotHubServiceErrorCode.ThrottlingMaxActiveJobCountExceeded
or IotHubServiceErrorCode.DeviceThrottlingLimitExceeded
or IotHubServiceErrorCode.ServerError
or IotHubServiceErrorCode.ServiceUnavailable
or IotHubServiceErrorCode.RequestTimeout
Expand Down