diff --git a/Client/Internal/RestClient.cs b/Client/Internal/RestClient.cs index 441c4ab..f1b7a41 100644 --- a/Client/Internal/RestClient.cs +++ b/Client/Internal/RestClient.cs @@ -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; } }