diff --git a/src/libs/Reverie/Generated/Reverie.Exceptions.g.cs b/src/libs/Reverie/Generated/Reverie.Exceptions.g.cs
index 22e7f95..66a8a5b 100644
--- a/src/libs/Reverie/Generated/Reverie.Exceptions.g.cs
+++ b/src/libs/Reverie/Generated/Reverie.Exceptions.g.cs
@@ -12,16 +12,19 @@ public partial class ApiException : global::System.Exception
/// The HTTP status code of the response.
///
public global::System.Net.HttpStatusCode StatusCode { get; }
+
///
/// The response body as a string, or null if the body could not be read.
/// This is always populated for error responses regardless of the ReadResponseAsString setting.
/// For success-path failures (e.g. deserialization errors), the client attempts a best-effort read.
///
public string? ResponseBody { get; set; }
+
///
/// The response headers.
///
public global::System.Collections.Generic.Dictionary>? ResponseHeaders { get; set; }
+
///
/// Initializes a new instance of the class.
///
@@ -49,6 +52,103 @@ public ApiException(string message, global::System.Exception? innerException, gl
{
StatusCode = statusCode;
}
+
+ ///
+ /// Constructs an instance whose runtime type matches the response status code when the typed exception hierarchy is enabled. Always returns a plain when the hierarchy is disabled.
+ ///
+ /// The HTTP status code of the response.
+ /// The error message.
+ /// An inner exception, when one is available.
+ /// The response headers; consulted for 429 Retry-After parsing when present.
+ public static global::Reverie.ApiException Create(
+ global::System.Net.HttpStatusCode statusCode,
+ string message,
+ global::System.Exception? innerException = null,
+ global::System.Collections.Generic.IDictionary>? responseHeaders = null)
+ {
+ return new global::Reverie.ApiException(message, innerException, statusCode);
+ }
+
+ ///
+ /// Convenience overload that constructs an with response body and headers populated.
+ ///
+ public static global::Reverie.ApiException Create(
+ global::System.Net.HttpStatusCode statusCode,
+ string message,
+ global::System.Exception? innerException,
+ string? responseBody,
+ global::System.Collections.Generic.Dictionary>? responseHeaders)
+ {
+ var exception = global::Reverie.ApiException.Create(statusCode, message, innerException, responseHeaders);
+ exception.ResponseBody = responseBody;
+ exception.ResponseHeaders = responseHeaders;
+ return exception;
+ }
+
+ ///
+ /// Parses a Retry-After response header (delta-seconds or HTTP-date) into a .
+ /// Returns null when the header is missing or unparseable. Public so consumer code that observes
+ /// directly can recover the value without re-implementing the parser.
+ ///
+ public static global::System.TimeSpan? TryParseRetryAfter(
+ global::System.Collections.Generic.IDictionary>? headers)
+ {
+ if (headers == null)
+ {
+ return null;
+ }
+
+ global::System.Collections.Generic.IEnumerable? values = null;
+ foreach (var entry in headers)
+ {
+ if (string.Equals(entry.Key, "Retry-After", global::System.StringComparison.OrdinalIgnoreCase))
+ {
+ values = entry.Value;
+ break;
+ }
+ }
+
+ if (values == null)
+ {
+ return null;
+ }
+
+ string? raw = null;
+ foreach (var value in values)
+ {
+ if (!string.IsNullOrWhiteSpace(value))
+ {
+ raw = value.Trim();
+ break;
+ }
+ }
+
+ if (string.IsNullOrEmpty(raw))
+ {
+ return null;
+ }
+
+ if (int.TryParse(
+ raw,
+ global::System.Globalization.NumberStyles.Integer,
+ global::System.Globalization.CultureInfo.InvariantCulture,
+ out var seconds) && seconds >= 0)
+ {
+ return global::System.TimeSpan.FromSeconds(seconds);
+ }
+
+ if (global::System.DateTimeOffset.TryParse(
+ raw,
+ global::System.Globalization.CultureInfo.InvariantCulture,
+ global::System.Globalization.DateTimeStyles.AssumeUniversal | global::System.Globalization.DateTimeStyles.AdjustToUniversal,
+ out var when))
+ {
+ var delta = when - global::System.DateTimeOffset.UtcNow;
+ return delta > global::System.TimeSpan.Zero ? delta : global::System.TimeSpan.Zero;
+ }
+
+ return null;
+ }
}
///
@@ -88,5 +188,39 @@ public ApiException(string message, global::System.Net.HttpStatusCode statusCode
public ApiException(string message, global::System.Exception? innerException, global::System.Net.HttpStatusCode statusCode) : base(message, innerException, statusCode)
{
}
+
+ ///
+ /// Constructs an whose runtime type matches the response status code when the typed exception hierarchy is enabled.
+ ///
+ /// The HTTP status code of the response.
+ /// The error message.
+ /// An inner exception, when one is available.
+ /// The response headers; consulted for 429 Retry-After parsing when present.
+ public static new global::Reverie.ApiException Create(
+ global::System.Net.HttpStatusCode statusCode,
+ string message,
+ global::System.Exception? innerException = null,
+ global::System.Collections.Generic.IDictionary>? responseHeaders = null)
+ {
+ return new global::Reverie.ApiException(message, innerException, statusCode);
+ }
+
+ ///
+ /// Convenience overload that constructs an with response body, object, and headers populated.
+ ///
+ public static global::Reverie.ApiException Create(
+ global::System.Net.HttpStatusCode statusCode,
+ string message,
+ global::System.Exception? innerException,
+ string? responseBody,
+ T? responseObject,
+ global::System.Collections.Generic.Dictionary>? responseHeaders)
+ {
+ var exception = global::Reverie.ApiException.Create(statusCode, message, innerException, responseHeaders);
+ exception.ResponseBody = responseBody;
+ exception.ResponseObject = responseObject;
+ exception.ResponseHeaders = responseHeaders;
+ return exception;
+ }
}
}
\ No newline at end of file
diff --git a/src/libs/Reverie/Generated/Reverie.OptionsSupport.g.cs b/src/libs/Reverie/Generated/Reverie.OptionsSupport.g.cs
index 9943856..d8fe1de 100644
--- a/src/libs/Reverie/Generated/Reverie.OptionsSupport.g.cs
+++ b/src/libs/Reverie/Generated/Reverie.OptionsSupport.g.cs
@@ -150,6 +150,84 @@ public interface IAutoSDKAuthorizationProvider
global::Reverie.AutoSDKHookContext context);
}
+ ///
+ /// Marker keys stamped onto outgoing
+ /// instances so consumer s — and any
+ /// other transport-layer code that runs after AutoSDK's send pipeline — can observe whether
+ /// the resolved Authorization is call-scoped and opt out of overwriting it with a
+ /// rotation-aware account-level credential.
+ ///
+ public static class AutoSDKHttpRequestOptions
+ {
+ ///
+ /// Key under which records the marker. Exposed
+ /// for handlers that target frameworks older than .NET 5 and need to read the value
+ /// through the legacy HttpRequestMessage.Properties bag.
+ ///
+ public const string AuthorizationOverrideKey = "AutoSDK.AuthorizationOverride";
+
+#if NET5_0_OR_GREATER
+ ///
+ /// Strongly-typed for
+ /// the call-scoped Authorization marker on .NET 5+ targets. Consumers should prefer this
+ /// over the legacy HttpRequestMessage.Properties bag where available.
+ ///
+ public static readonly global::System.Net.Http.HttpRequestOptionsKey AuthorizationOverride =
+ new global::System.Net.Http.HttpRequestOptionsKey(AuthorizationOverrideKey);
+#endif
+
+ ///
+ /// Stamps the call-scoped Authorization marker on . AutoSDK's
+ /// built-in calls this whenever the
+ /// resolved auth came from a per-request override or a client-level
+ /// . Hand-written SDK extensions that set a
+ /// non-default Authorization header (e.g. a session-scoped bearer returned by an
+ /// upstream poll) should call this too so downstream rotation handlers know to skip the
+ /// overwrite.
+ ///
+ ///
+ public static void StampAuthorizationOverride(
+ global::System.Net.Http.HttpRequestMessage? request)
+ {
+ if (request is null)
+ {
+ return;
+ }
+
+#if NET5_0_OR_GREATER
+ request.Options.Set(AuthorizationOverride, true);
+#else
+#pragma warning disable CS0618 // HttpRequestMessage.Properties is obsolete in NET5+, but the only option below it.
+ request.Properties[AuthorizationOverrideKey] = true;
+#pragma warning restore CS0618
+#endif
+ }
+
+ ///
+ /// Returns true when previously marked the
+ /// request as carrying a call-scoped Authorization.
+ ///
+ ///
+ public static bool HasAuthorizationOverride(
+ global::System.Net.Http.HttpRequestMessage? request)
+ {
+ if (request is null)
+ {
+ return false;
+ }
+
+#if NET5_0_OR_GREATER
+ return request.Options.TryGetValue(AuthorizationOverride, out var value) && value;
+#else
+#pragma warning disable CS0618
+ return request.Properties.TryGetValue(AuthorizationOverrideKey, out var raw) &&
+ raw is bool flag &&
+ flag;
+#pragma warning restore CS0618
+#endif
+ }
+ }
+
///
/// Built-in that consults
/// before every outgoing
@@ -176,6 +254,7 @@ public sealed class AutoSDKAuthorizationProviderHook : global::Reverie.AutoSDKHo
ApplyAuthorization(context.Request, perRequest[index]);
}
+ global::Reverie.AutoSDKHttpRequestOptions.StampAuthorizationOverride(context.Request);
return;
}
@@ -195,6 +274,8 @@ public sealed class AutoSDKAuthorizationProviderHook : global::Reverie.AutoSDKHo
{
ApplyAuthorization(context.Request, resolved[index]);
}
+
+ global::Reverie.AutoSDKHttpRequestOptions.StampAuthorizationOverride(context.Request);
}
private static void ApplyAuthorization(
diff --git a/src/libs/Reverie/Generated/Reverie.SpeechToTextClient.GetBatchStatus.g.cs b/src/libs/Reverie/Generated/Reverie.SpeechToTextClient.GetBatchStatus.g.cs
index 2b67bfe..9868269 100644
--- a/src/libs/Reverie/Generated/Reverie.SpeechToTextClient.GetBatchStatus.g.cs
+++ b/src/libs/Reverie/Generated/Reverie.SpeechToTextClient.GetBatchStatus.g.cs
@@ -364,17 +364,15 @@ partial void ProcessGetBatchStatusResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -411,17 +409,15 @@ partial void ProcessGetBatchStatusResponseContent(
{
}
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/Reverie/Generated/Reverie.SpeechToTextClient.GetBatchTranscript.g.cs b/src/libs/Reverie/Generated/Reverie.SpeechToTextClient.GetBatchTranscript.g.cs
index 2e9e4fd..ce6c20d 100644
--- a/src/libs/Reverie/Generated/Reverie.SpeechToTextClient.GetBatchTranscript.g.cs
+++ b/src/libs/Reverie/Generated/Reverie.SpeechToTextClient.GetBatchTranscript.g.cs
@@ -364,17 +364,15 @@ partial void ProcessGetBatchTranscriptResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -411,17 +409,15 @@ partial void ProcessGetBatchTranscriptResponseContent(
{
}
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/Reverie/Generated/Reverie.SpeechToTextClient.TranscribeFile.g.cs b/src/libs/Reverie/Generated/Reverie.SpeechToTextClient.TranscribeFile.g.cs
index 627e4cf..2421c1f 100644
--- a/src/libs/Reverie/Generated/Reverie.SpeechToTextClient.TranscribeFile.g.cs
+++ b/src/libs/Reverie/Generated/Reverie.SpeechToTextClient.TranscribeFile.g.cs
@@ -454,17 +454,15 @@ request.Audioname is null
}
catch (global::System.Exception __ex)
{
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -501,17 +499,15 @@ request.Audioname is null
{
}
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
@@ -931,17 +927,15 @@ request.Audioname is null
}
catch (global::System.Exception __ex)
{
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -974,17 +968,15 @@ request.Audioname is null
{
}
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
@@ -1373,17 +1365,15 @@ request.Audioname is null
}
catch (global::System.Exception __ex)
{
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -1420,17 +1410,15 @@ request.Audioname is null
{
}
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/Reverie/Generated/Reverie.SpeechToTextClient.UploadBatchAudio.g.cs b/src/libs/Reverie/Generated/Reverie.SpeechToTextClient.UploadBatchAudio.g.cs
index 49fcb66..19b976c 100644
--- a/src/libs/Reverie/Generated/Reverie.SpeechToTextClient.UploadBatchAudio.g.cs
+++ b/src/libs/Reverie/Generated/Reverie.SpeechToTextClient.UploadBatchAudio.g.cs
@@ -452,17 +452,15 @@ request.Audioname is null
}
catch (global::System.Exception __ex)
{
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -499,17 +497,15 @@ request.Audioname is null
{
}
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
@@ -927,17 +923,15 @@ request.Audioname is null
}
catch (global::System.Exception __ex)
{
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -970,17 +964,15 @@ request.Audioname is null
{
}
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
@@ -1368,17 +1360,15 @@ request.Audioname is null
}
catch (global::System.Exception __ex)
{
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -1415,17 +1405,15 @@ request.Audioname is null
{
}
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/Reverie/Generated/Reverie.TextToSpeechClient.TextToSpeech.g.cs b/src/libs/Reverie/Generated/Reverie.TextToSpeechClient.TextToSpeech.g.cs
index 2ad0600..a0e6859 100644
--- a/src/libs/Reverie/Generated/Reverie.TextToSpeechClient.TextToSpeech.g.cs
+++ b/src/libs/Reverie/Generated/Reverie.TextToSpeechClient.TextToSpeech.g.cs
@@ -385,17 +385,15 @@ partial void ProcessTextToSpeechResponseContent(
{
}
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
@@ -716,16 +714,15 @@ partial void ProcessTextToSpeechResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: null,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -760,17 +757,15 @@ partial void ProcessTextToSpeechResponseContent(
{
}
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/Reverie/Generated/Reverie.TranslationClient.Translate.g.cs b/src/libs/Reverie/Generated/Reverie.TranslationClient.Translate.g.cs
index 1873624..ab8cf85 100644
--- a/src/libs/Reverie/Generated/Reverie.TranslationClient.Translate.g.cs
+++ b/src/libs/Reverie/Generated/Reverie.TranslationClient.Translate.g.cs
@@ -377,17 +377,15 @@ partial void ProcessTranslateResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -424,17 +422,15 @@ partial void ProcessTranslateResponseContent(
{
}
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
diff --git a/src/libs/Reverie/Generated/Reverie.TransliterationClient.Transliterate.g.cs b/src/libs/Reverie/Generated/Reverie.TransliterationClient.Transliterate.g.cs
index 33e2af7..442b5c6 100644
--- a/src/libs/Reverie/Generated/Reverie.TransliterationClient.Transliterate.g.cs
+++ b/src/libs/Reverie/Generated/Reverie.TransliterationClient.Transliterate.g.cs
@@ -377,17 +377,15 @@ partial void ProcessTransliterateResponseContent(
}
catch (global::System.Exception __ex)
{
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}
else
@@ -424,17 +422,15 @@ partial void ProcessTransliterateResponseContent(
{
}
- throw new global::Reverie.ApiException(
+ throw global::Reverie.ApiException.Create(
+ statusCode: __response.StatusCode,
message: __content ?? __response.ReasonPhrase ?? string.Empty,
innerException: __ex,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
- h => h.Value),
- };
+ h => h.Value));
}
}