Skip to content

Commit 80c5cab

Browse files
committed
Include error message in line one.
1 parent d2d0e2e commit 80c5cab

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/Custom/HttpMessageLogFormatter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public static async Task<string> GetErrorLogAsync(HttpResponseMessage response)
9696
string body = string.Empty;
9797
try
9898
{
99-
body = (response.Content == null) ? string.Empty : FormatString(await response.Content.ReadAsStringAsync());
99+
body = (response.Content == null) ? string.Empty : await response.Content.ReadAsStringAsync();
100100
}
101101
catch { }
102102

tools/Custom/PSCmdletExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ internal static async Task<ErrorDetails> GetErrorDetailsAsync(this PSCmdlet cmdl
111111
var serviceErrorDoc = "https://learn.microsoft.com/graph/errors";
112112
var recommendedAction = $"See service error codes: {serviceErrorDoc}";
113113
var errorDetailsMessage = await HttpMessageLogFormatter.GetErrorLogAsync(response);
114-
return new ErrorDetails(errorDetailsMessage)
114+
return new ErrorDetails($"{odataError?.Message}{Environment.NewLine}{errorDetailsMessage}")
115115
{
116116
RecommendedAction = recommendedAction
117117
};

0 commit comments

Comments
 (0)