Skip to content

Commit

Permalink
style: code formattting
Browse files Browse the repository at this point in the history
  • Loading branch information
alespour committed Jul 30, 2024
1 parent f1ad04d commit 422f6b8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Client/Internal/RestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,16 @@ internal async Task Request(string path, HttpMethod method, HttpContent? content
if (new DataContractJsonSerializer(typeof(ErrorBody)).ReadObject(memoryStream) is ErrorBody
errorBody)
{
if (!string.IsNullOrEmpty(errorBody.Message)) { // Cloud
if (!string.IsNullOrEmpty(errorBody.Message)) // Cloud
{
message = errorBody.Message;
} else if ((errorBody.Data is not null) && !string.IsNullOrEmpty(errorBody.Data.ErrorMessage)) { // Edge
}
else if ((errorBody.Data is not null) && !string.IsNullOrEmpty(errorBody.Data.ErrorMessage)) // Edge
{
message = errorBody.Data.ErrorMessage;
} else if (!string.IsNullOrEmpty(errorBody.Error)) { // Edge
}
else if (!string.IsNullOrEmpty(errorBody.Error)) // Edge
{
message = errorBody.Error;
}
}
Expand Down

0 comments on commit 422f6b8

Please sign in to comment.