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

Obsolete error codes that are not throw by the service #2079

Merged
Merged
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
77 changes: 68 additions & 9 deletions iothub/service/src/Common/Exceptions/ErrorCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,53 @@ public enum ErrorCode
// BadRequest - 400
InvalidProtocolVersion = 400001,

/// <summary>
/// Unused error code. Service does not return it and neither does the SDK.
/// </summary>
[Obsolete("This error does not appear to be thrown by the service.")]
[EditorBrowsable(EditorBrowsableState.Never)]
DeviceInvalidResultCount = 400002,

InvalidOperation = 400003,
ArgumentInvalid = 400004,
ArgumentNull = 400005,
IotHubFormatError = 400006,

/// <summary>
/// Unused error code. Service does not return it and neither does the SDK.
/// </summary>
[Obsolete("This error does not appear to be thrown by the service.")]
[EditorBrowsable(EditorBrowsableState.Never)]
DeviceStorageEntitySerializationError = 400007,

/// <summary>
/// An error was encountered validating the storage blob container URI.
/// Unused error code. Service does not return it and neither does the SDK.
/// </summary>
/// <remarks>
/// As this error is in the 4xx HTTP status code range, the service would have detected a problem with the blob container
/// URI, such as does not exist, insufficient permissions, or SAS token expiry exceeded.
/// </remarks>
timtay-microsoft marked this conversation as resolved.
Show resolved Hide resolved
[Obsolete("This error does not appear to be returned by the service.")]
[Obsolete("This error does not appear to be thrown by the service.")]
[EditorBrowsable(EditorBrowsableState.Never)]
BlobContainerValidationError = 400008,

/// <summary>
/// Unused error code. Service does not return it and neither does the SDK.
/// </summary>
[Obsolete("This error does not appear to be thrown by the service.")]
[EditorBrowsable(EditorBrowsableState.Never)]
ImportWarningExistsError = 400009,

/// <summary>
/// Unused error code. Service does not return it and neither does the SDK.
/// </summary>
[Obsolete("This error does not appear to be thrown by the service.")]
[EditorBrowsable(EditorBrowsableState.Never)]
InvalidSchemaVersion = 400010,

DeviceDefinedMultipleTimes = 400011,

/// <summary>
/// Unused error code. Service does not return it and neither does the SDK.
/// </summary>
[Obsolete("This error does not appear to be thrown by the service.")]
[EditorBrowsable(EditorBrowsableState.Never)]
DeserializationError = 400012,

/// <summary>
Expand All @@ -51,20 +77,36 @@ public enum ErrorCode
//[EditorBrowsable(EditorBrowsableState.Never)]
BulkRegistryOperationFailure = 400013,

/// <summary>
/// Unused error code. Service does not return it and neither does the SDK.
/// </summary>
[Obsolete("This error does not appear to be returned by the service.")]
[EditorBrowsable(EditorBrowsableState.Never)]
CannotRegisterModuleToModule = 400301,

// Unauthorized - 401
IotHubNotFound = 401001,

IotHubUnauthorizedAccess = 401002,

/// <summary>
/// The SAS token has expired or IoT hub couldn't authenticate the authentication header, rule, or key.
/// For detailed information, see <see href="https://docs.microsoft.com/azure/iot-hub/iot-hub-troubleshoot-error-401003-iothubunauthorized"/>.
/// </summary>
IotHubUnauthorizedAccess = 401002,

/// <summary>
/// Unused error code. Service does not return it and neither does the SDK. Replaced by <see cref="IotHubUnauthorizedAccess"/>
/// </summary>
[Obsolete("This error does not appear to be thrown by the service.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IotHubUnauthorized = 401003,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git shows this as deleted, but it wasn't. Line 82 on the new file still has it.


// Forbidden - 403

/// <summary>
/// Unused error code. Service does not return it and neither does the SDK.
/// </summary>
[Obsolete("This error does not appear to be thrown by the service.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IotHubSuspended = 403001,

/// <summary>
Expand All @@ -73,7 +115,7 @@ public enum ErrorCode
IotHubQuotaExceeded = 403002,

/// <summary>
/// The IoT Hub has exceeded the available quota for active jobs.
/// Unused error code. Service does not return it and neither does the SDK.
/// </summary>
[Obsolete("This error does not appear to be returned by the service.")]
[EditorBrowsable(EditorBrowsableState.Never)]
Expand All @@ -86,6 +128,11 @@ public enum ErrorCode
/// </summary>
DeviceMaximumQueueDepthExceeded = 403004,

/// <summary>
/// Unused error code. Service does not return it and neither does the SDK.
/// </summary>
[Obsolete("This error does not appear to be thrown by the service.")]
[EditorBrowsable(EditorBrowsableState.Never)]
IotHubMaxCbsTokenExceeded = 403005,

// NotFound - 404
Expand All @@ -95,7 +142,13 @@ public enum ErrorCode
/// </summary>
DeviceNotFound = 404001,

/// <summary>
/// Unused error code. Service does not return it and neither does the SDK.
/// </summary>
[Obsolete("This error does not appear to be thrown by the service.")]
[EditorBrowsable(EditorBrowsableState.Never)]
JobNotFound = 404002,

PartitionNotFound = 404003,
ModuleNotFound = 404010,

Expand Down Expand Up @@ -133,6 +186,12 @@ public enum ErrorCode
ThrottlingException = 429001,

ThrottleBacklogLimitExceeded = 429002,

/// <summary>
/// Unused error code. Service does not return it and neither does the SDK.
/// </summary>
[Obsolete("This error does not appear to be thrown by the service.")]
[EditorBrowsable(EditorBrowsableState.Never)]
InvalidThrottleParameter = 429003,

// InternalServerError - 500
Expand Down