in edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Amqp/AmqpErrorMapper.cs [19:63]
public static AmqpSymbol GetErrorCondition(ErrorCode errorCode)
{
switch (errorCode)
{
case ErrorCode.InvalidOperation:
return AmqpErrorCode.NotAllowed;
case ErrorCode.ArgumentInvalid:
case ErrorCode.ArgumentNull:
return ArgumentError;
case ErrorCode.IotHubUnauthorizedAccess:
case ErrorCode.IotHubUnauthorized:
return AmqpErrorCode.UnauthorizedAccess;
case ErrorCode.DeviceNotFound:
return AmqpErrorCode.NotFound;
case ErrorCode.DeviceMessageLockLost:
return MessageLockLostError;
case ErrorCode.IotHubQuotaExceeded:
case ErrorCode.DeviceMaximumQueueDepthExceeded:
case ErrorCode.IotHubMaxCbsTokenExceeded:
return AmqpErrorCode.ResourceLimitExceeded;
case ErrorCode.IotHubSuspended:
return IotHubSuspended;
case ErrorCode.IotHubNotFound:
return IotHubNotFoundError;
case ErrorCode.PreconditionFailed:
return PreconditionFailed;
case ErrorCode.MessageTooLarge:
return AmqpErrorCode.MessageSizeExceeded;
case ErrorCode.ThrottlingException:
return DeviceContainerThrottled;
default:
return AmqpErrorCode.InternalError;
}
}