Unverified Commit c373fae1 authored by David Kline's avatar David Kline Committed by GitHub
Browse files

Merge pull request #290 from WilliamsJason/WilliamsJason_minorErrorHandling

Minor fix to avoid exception in error parsing case
parents 06b65c17 f458f2f7
Loading
Loading
Loading
Loading
+14 −11
Original line number Diff line number Diff line
@@ -153,6 +153,8 @@ namespace Microsoft.Tools.WindowsDevicePortal
                    {
                        HttpErrorResponse errorResponse = DevicePortal.ReadJsonStream<HttpErrorResponse>(dataStream);

                        if (errorResponse != null)
                        {
                            error.HResult = errorResponse.ErrorCode;
                            error.Reason = errorResponse.ErrorMessage;

@@ -169,6 +171,7 @@ namespace Microsoft.Tools.WindowsDevicePortal
                        }
                    }
                }
            }
            catch (Exception)
            {
                // Do nothing if we fail to get additional error details from the response body.