ServiceProblem
Namespace: Meshmakers.Octo.Sdk.ServiceClient
An RFC 9457 problem answer (application/problem+json) of an OctoMesh service, read from a
ServiceClientResultException. Clients branch on ServiceProblem.Code, the stable,
language-neutral code extension (e.g. the constants in
Meshmakers.Octo.Communication.Contracts.DataTransferObjects.ApiErrors.CrossTenantGrantProblemCodes);
ServiceProblem.Title and ServiceProblem.Detail are English text for humans.
public record ServiceProblem : IEquatable<ServiceProblem>
Inheritance Object → ServiceProblem
Implements IEquatable<ServiceProblem>
Properties
Status
The status member, or the HTTP status of the answer when the body has none.
public int Status { get; set; }
Property Value
Code
The code extension, if any.
public string Code { get; set; }
Property Value
Title
The title member, if any.
public string Title { get; set; }
Property Value
Detail
The detail member, if any.
public string Detail { get; set; }
Property Value
RetryAfterSeconds
The retryAfterSeconds extension of a rate-limited answer (429), if any.
public Nullable<int> RetryAfterSeconds { get; set; }
Property Value
UnknownGroupIds
The unknownGroupIds extension of an UnknownGroup answer; empty otherwise.
public IReadOnlyList<string> UnknownGroupIds { get; set; }
Property Value
ExistingMappingId
The existingMappingId extension of an ExternalTenantUserMappingAlreadyExists answer.
public string ExistingMappingId { get; set; }
Property Value
Constructors
ServiceProblem()
public ServiceProblem()
Methods
TryParse(ServiceClientResultException, out ServiceProblem)
Reads the problem body of exception. Returns false when the answer had no JSON object
body, or the body carries neither code, title nor detail (then it is no problem answer).
public static bool TryParse(ServiceClientResultException exception, out ServiceProblem problem)
Parameters
exception ServiceClientResultException
The exception thrown by a service client.
problem ServiceProblem
The problem, when the method returns true.
Returns
ToDisplayText()
One readable line: title and detail, the code, and the extensions a caller acts on (wait time, unknown group ids, existing mapping id). Contains only what the service answered.
public string ToDisplayText()