Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions src/libs/Terra/Generated/Terra.ActivityClient.ActivityGet.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,43 @@ partial void ProcessActivityGetResponseContent(
h => h.Key,
h => h.Value));
}
// The credential is not authorized, the environment is disabled, or the required product entitlement is missing.
if ((int)__response.StatusCode == 403)
{
string? __content_403 = null;
global::System.Exception? __exception_403 = null;
global::Terra.Problem? __value_403 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_403 = global::Terra.Problem.FromJson(__content_403, JsonSerializerContext);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_403 = global::Terra.Problem.FromJson(__content_403, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_403 = __ex;
}


throw global::Terra.ApiException<global::Terra.Problem>.Create(
statusCode: __response.StatusCode,
message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_403,
responseBody: __content_403,
responseObject: __value_403,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}
// A referenced resource does not exist on Terra's end.
if ((int)__response.StatusCode == 404)
{
Expand Down Expand Up @@ -480,6 +517,43 @@ partial void ProcessActivityGetResponseContent(
h => h.Key,
h => h.Value));
}
// Current product authorization is unavailable; retry after the service recovers.
if ((int)__response.StatusCode == 503)
{
string? __content_503 = null;
global::System.Exception? __exception_503 = null;
global::Terra.Problem? __value_503 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_503 = global::Terra.Problem.FromJson(__content_503, JsonSerializerContext);
}
else
{
__content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_503 = global::Terra.Problem.FromJson(__content_503, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_503 = __ex;
}


throw global::Terra.ApiException<global::Terra.Problem>.Create(
statusCode: __response.StatusCode,
message: __content_503 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_503,
responseBody: __content_503,
responseObject: __value_503,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}

if (__effectiveReadResponseAsString)
{
Expand Down
74 changes: 74 additions & 0 deletions src/libs/Terra/Generated/Terra.AthleteClient.AthleteGet.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,43 @@ partial void ProcessAthleteGetResponseContent(
h => h.Key,
h => h.Value));
}
// The credential is not authorized, the environment is disabled, or the required product entitlement is missing.
if ((int)__response.StatusCode == 403)
{
string? __content_403 = null;
global::System.Exception? __exception_403 = null;
global::Terra.Problem? __value_403 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_403 = global::Terra.Problem.FromJson(__content_403, JsonSerializerContext);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_403 = global::Terra.Problem.FromJson(__content_403, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_403 = __ex;
}


throw global::Terra.ApiException<global::Terra.Problem>.Create(
statusCode: __response.StatusCode,
message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_403,
responseBody: __content_403,
responseObject: __value_403,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}
// A referenced resource does not exist on Terra's end.
if ((int)__response.StatusCode == 404)
{
Expand Down Expand Up @@ -450,6 +487,43 @@ partial void ProcessAthleteGetResponseContent(
h => h.Key,
h => h.Value));
}
// Current product authorization is unavailable; retry after the service recovers.
if ((int)__response.StatusCode == 503)
{
string? __content_503 = null;
global::System.Exception? __exception_503 = null;
global::Terra.Problem? __value_503 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_503 = global::Terra.Problem.FromJson(__content_503, JsonSerializerContext);
}
else
{
__content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_503 = global::Terra.Problem.FromJson(__content_503, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_503 = __ex;
}


throw global::Terra.ApiException<global::Terra.Problem>.Create(
statusCode: __response.StatusCode,
message: __content_503 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_503,
responseBody: __content_503,
responseObject: __value_503,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}

if (__effectiveReadResponseAsString)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,43 @@ partial void ProcessAuthenticationAuthenticateUserResponseContent(
h => h.Key,
h => h.Value));
}
// The credential is not authorized, the environment is disabled, or the required product entitlement is missing.
if ((int)__response.StatusCode == 403)
{
string? __content_403 = null;
global::System.Exception? __exception_403 = null;
global::Terra.Problem? __value_403 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_403 = global::Terra.Problem.FromJson(__content_403, JsonSerializerContext);
}
else
{
__content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_403 = global::Terra.Problem.FromJson(__content_403, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_403 = __ex;
}


throw global::Terra.ApiException<global::Terra.Problem>.Create(
statusCode: __response.StatusCode,
message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_403,
responseBody: __content_403,
responseObject: __value_403,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}
// A referenced resource does not exist on Terra's end.
if ((int)__response.StatusCode == 404)
{
Expand Down Expand Up @@ -423,6 +460,43 @@ partial void ProcessAuthenticationAuthenticateUserResponseContent(
h => h.Key,
h => h.Value));
}
// Current product authorization is unavailable; retry after the service recovers.
if ((int)__response.StatusCode == 503)
{
string? __content_503 = null;
global::System.Exception? __exception_503 = null;
global::Terra.Problem? __value_503 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_503 = global::Terra.Problem.FromJson(__content_503, JsonSerializerContext);
}
else
{
__content_503 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_503 = global::Terra.Problem.FromJson(__content_503, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_503 = __ex;
}


throw global::Terra.ApiException<global::Terra.Problem>.Create(
statusCode: __response.StatusCode,
message: __content_503 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_503,
responseBody: __content_503,
responseObject: __value_503,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}

if (__effectiveReadResponseAsString)
{
Expand Down
Loading