diff --git a/src/libs/Simli/Generated/Simli.Exceptions.g.cs b/src/libs/Simli/Generated/Simli.Exceptions.g.cs index 39c8c45..081e6f5 100644 --- a/src/libs/Simli/Generated/Simli.Exceptions.g.cs +++ b/src/libs/Simli/Generated/Simli.Exceptions.g.cs @@ -20,6 +20,32 @@ public partial class ApiException : global::System.Exception /// public string? ResponseBody { get; set; } + /// + /// Successful HTTP responses that fail during processing put the cause before a bounded body preview. + /// Inspect ResponseBody for the full response; HTTP service-error messages retain their existing format. + /// + public override string Message + { + get + { + if ((int)StatusCode < 200 || (int)StatusCode >= 300 || InnerException == null) + { + return base.Message; + } + + string? path = (InnerException as global::System.Text.Json.JsonException)?.Path; + return "Response processing failed after successful HTTP " + + ((int)StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture) + ": " + + InnerException.GetType().FullName + ": " + BoundDiagnosticText(InnerException.Message) + + (string.IsNullOrEmpty(path) ? string.Empty : " Path: " + BoundDiagnosticText(path, 256)) + + "\nResponse preview: " + BoundDiagnosticText(base.Message); + } + } + + private static string BoundDiagnosticText(string? value, int maximumLength = 512) => + value == null ? string.Empty : + value.Length <= maximumLength ? value : value.Substring(0, maximumLength) + "... [truncated]"; + /// /// The response headers. /// diff --git a/src/libs/Simli/Generated/Simli.JsonSerializerContext.g.cs b/src/libs/Simli/Generated/Simli.JsonSerializerContext.g.cs index 40b80e8..dccf684 100644 --- a/src/libs/Simli/Generated/Simli.JsonSerializerContext.g.cs +++ b/src/libs/Simli/Generated/Simli.JsonSerializerContext.g.cs @@ -90,6 +90,7 @@ namespace Simli #pragma warning restore CS3016 [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.JsonSerializerContextTypes))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List), TypeInfoPropertyName = "SystemCollectionsGeneric_ObjectList")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(string[]))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Simli.FacesRequest))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Guid))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(string))] diff --git a/src/libs/Simli/Generated/Simli.JsonSerializerContextTypes.g.cs b/src/libs/Simli/Generated/Simli.JsonSerializerContextTypes.g.cs index b993c7a..7265928 100644 --- a/src/libs/Simli/Generated/Simli.JsonSerializerContextTypes.g.cs +++ b/src/libs/Simli/Generated/Simli.JsonSerializerContextTypes.g.cs @@ -25,6 +25,11 @@ public sealed partial class JsonSerializerContextTypes /// public global::System.Collections.Generic.List? ObjectList { get; set; } + /// + /// String arrays used by dynamic JSON option values. + /// + public string[]? StringArray { get; set; } + /// /// /// diff --git a/src/libs/Simli/Generated/Simli.Realtime.Exceptions.g.cs b/src/libs/Simli/Generated/Simli.Realtime.Exceptions.g.cs index 600ed7b..6e05646 100644 --- a/src/libs/Simli/Generated/Simli.Realtime.Exceptions.g.cs +++ b/src/libs/Simli/Generated/Simli.Realtime.Exceptions.g.cs @@ -20,6 +20,32 @@ public partial class ApiException : global::System.Exception /// public string? ResponseBody { get; set; } + /// + /// Successful HTTP responses that fail during processing put the cause before a bounded body preview. + /// Inspect ResponseBody for the full response; HTTP service-error messages retain their existing format. + /// + public override string Message + { + get + { + if ((int)StatusCode < 200 || (int)StatusCode >= 300 || InnerException == null) + { + return base.Message; + } + + string? path = (InnerException as global::System.Text.Json.JsonException)?.Path; + return "Response processing failed after successful HTTP " + + ((int)StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture) + ": " + + InnerException.GetType().FullName + ": " + BoundDiagnosticText(InnerException.Message) + + (string.IsNullOrEmpty(path) ? string.Empty : " Path: " + BoundDiagnosticText(path, 256)) + + "\nResponse preview: " + BoundDiagnosticText(base.Message); + } + } + + private static string BoundDiagnosticText(string? value, int maximumLength = 512) => + value == null ? string.Empty : + value.Length <= maximumLength ? value : value.Substring(0, maximumLength) + "... [truncated]"; + /// /// The response headers. ///