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

fix(iot-service): Hide unreferenced error code #2094

Merged
merged 2 commits into from
Jul 13, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions iothub/service/src/Common/Exceptions/ErrorCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ public enum ErrorCode
/// the message is locked by IoT hub for a lock timeout duration of one minute.
/// If the device tries to complete the message after the lock timeout expires, IoT hub throws this exception.
/// </summary>
[Obsolete("This error should not be returned to a service application. This is relevant only for a device application.")]
[EditorBrowsable(EditorBrowsableState.Never)]
DeviceMessageLockLost = 412002,

// RequestEntityTooLarge - 413
Expand Down
4 changes: 0 additions & 4 deletions iothub/service/src/Common/TrackingHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,6 @@ public static ErrorCode GetErrorCodeFromAmqpError(Error ex)
{
return ErrorCode.DeviceNotFound;
}
if (ex.Condition.Equals(IotHubAmqpErrorCode.MessageLockLostError))
{
return ErrorCode.DeviceMessageLockLost;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

this is dead code for a service application

Copy link
Member

Choose a reason for hiding this comment

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

Agreed. However, it is public so just calling it out as a breaking change though in reality it should not be.

if (ex.Condition.Equals(IotHubAmqpErrorCode.IotHubSuspended))
{
return ErrorCode.IotHubSuspended;
Expand Down
2 changes: 1 addition & 1 deletion iothub/service/src/JobStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public enum JobStatus
Scheduled,

/// <summary>
/// Indicates that a Job is in the queue for execution (synonym for enqueued to be depricated)
/// Indicates that a Job is in the queue for execution (synonym for enqueued to be deprecated)
/// </summary>
[EnumMember(Value = "queued")]
Queued
Expand Down