Commit f458f2f7 authored by Jason Williams (BEARDED XBOX DEV)'s avatar Jason Williams (BEARDED XBOX DEV)
Browse files

Minor fix to avoid exception in error parsing case

parent 0c96e126
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.