Log InnerException without returning the error back to the UI

This commit is contained in:
Natsumi
2025-11-21 00:41:47 +11:00
parent 2a950abe1c
commit 222ad0ba57
+9 -9
View File
@@ -522,23 +522,23 @@ namespace VRCX
await streamReader.ReadToEndAsync() await streamReader.ReadToEndAsync()
); );
} }
var message = webException.Message; if (webException.InnerException != null)
if (webException.InnerException != null && webException.InnerException != webException) Logger.Error($"{webException.Message} | {webException.InnerException}");
message += $" | Inner Exception: {webException.InnerException}";
return new Tuple<int, string>( return new Tuple<int, string>(
-1, -1,
message webException.Message
); );
} }
catch (Exception e) catch (Exception e)
{ {
var message = e.Message; if (e.InnerException != null)
if (e.InnerException != null && e.InnerException != e) Logger.Error($"{e.Message} | {e.InnerException}");
message += $" | Inner Exception: {e.InnerException}";
return new Tuple<int, string>( return new Tuple<int, string>(
-1, -1,
message e.Message
); );
} }
} }