Fauna v10 .NET/C# Driver 1.0.1
 
Loading...
Searching...
No Matches
ServiceException.cs
Go to the documentation of this file.
1using System.Net;
2using Fauna.Core;
3
4namespace Fauna.Exceptions;
5
10{
11
15 public string? ErrorCode { get; init; }
16
20 public IDictionary<string, string> QueryTags { get; init; }
21
28 public long? SchemaVersion { get; init; }
29
33 public QueryStats Stats { get; init; }
34
38 public HttpStatusCode? StatusCode { get; set; }
39
43 public string? Summary { get; init; }
44
50 public long? TxnTs { get; init; }
51
56 public ServiceException(string message)
57 : base(message)
58 {
59 QueryTags = new Dictionary<string, string>();
60 }
61
67 public ServiceException(string message, QueryFailure failure)
68 : base(message)
69 {
70 StatusCode = failure.StatusCode;
71 ErrorCode = failure.ErrorCode;
72 Summary = failure.Summary;
73 Stats = failure.Stats;
74 TxnTs = failure.LastSeenTxn;
76 QueryTags = failure.QueryTags;
77 }
78
79}
Represents a failed query response.
string ErrorCode
The Fauna error code.
HttpStatusCode StatusCode
The HTTP status code.
QueryStats Stats
Gets the statistics related to the query execution.
long LastSeenTxn
Gets the last transaction seen by this query.
Dictionary< string, string > QueryTags
Gets a dictionary of query tags, providing additional context about the query.
string Summary
Gets a summary of the query execution.
long SchemaVersion
Gets the schema version.
Represents the base exception class for all exceptions specific to Fauna interactions.
Represents an exception related to Fauna service errors, particularly for query failures.
IDictionary< string, string > QueryTags
The tags on the x-query-tags header, if it was provided.
string? Summary
A comprehensive, human readable summary of any errors, warnings and/or logs returned from the query.
long? SchemaVersion
The schema version used by the query. This can be used by clients displaying schema to determine when...
HttpStatusCode? StatusCode
The HTTP status code.
string? ErrorCode
The error code when a query fails.
ServiceException(string message)
Initializes a new instance of the ServiceException class with a specified query failure details and e...
long? TxnTs
The transaction commit time in micros since epoch. Used by drivers to populate the x-last-txn-ts requ...
ServiceException(string message, QueryFailure failure)
Initializes a new instance of the ServiceException class with a specified query failure details and e...
A struct representing stats aggregated across queries.