-
Notifications
You must be signed in to change notification settings - Fork 4k
Show OperationID from CloudException thrown by Compute Cmdlets #546
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
Conversation
Release 0.9.4
Release 0.9.4
Release 0.9.4
Release 0.9.4
Hi @huangpf, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!
TTYL, AZPRBOT; |
Fix Start/Stop/Update-AzureVM
AzureRT S51 - Include OperationID in CloudException Message
Properties.Resources.ComputeCloudExceptionOperationIdMessage, | ||
headers[RequestIdHeaderInResponse].FirstOrDefault()); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit. you can do the same thing with a little bit less code:
var sb = new StringBuilder();
if(!string.IsNullOrEmpty(cloudException.Message))
{
sb.AppendLine(cloudException.Message);
}
if (cloudException.Response != null &&
cloudException.Response.Headers != null)
{
var headers = cloudException.Response.Headers;
if (headers.ContainsKey(RequestIdHeaderInResponse))
{
sb.AppendFormat(
Properties.Resources.ComputeCloudExceptionOperationIdMessage,
headers[RequestIdHeaderInResponse].FirstOrDefault());
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Thanks!
WriteObject(result); | ||
} | ||
if (this.Force.IsPresent | ||
|| this.ShouldContinue(Properties.Resources.AvailabilitySetRemovalConfirmation, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move the OR (||) on the line 55. There are several places with this type of line break. Please change them all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
LGTM |
Show OperationID from CloudException thrown by Compute Cmdlets
No description provided.