Enum TcgDexErrorKind
- Namespace
- TcgDex
- Assembly
- TcgDex.CSharpSdk.dll
What went wrong, for a TcgDex.TcgDexApiException.
public enum TcgDexErrorKindFields
Unspecified = 0-
Not classified. Only an exception constructed without a kind, such as one a caller builds in a test, carries this.
HttpStatus = 1-
The API answered with an error status. TcgDex.TcgDexApiException.StatusCode holds it, and TcgDex.TcgDexApiException.IsLanguageError tells an unsupported language apart from other
404s. Network = 2-
The request could not be sent, or the connection failed while the body was being read.
Timeout = 3-
The request took longer than TcgDex.TcgDexOptions.Timeout.
Canceled = 4-
Something in the HTTP pipeline other than the caller cancelled the request, such as System.Net.Http.HttpClient.Timeout. The caller's own cancellation is an System.OperationCanceledException instead, never this.
ResponseTooLarge = 5-
The body exceeded TcgDex.TcgDexOptions.MaxResponseBytes.
InvalidResponse = 6-
The response arrived but could not be used: malformed JSON, or no content where the endpoint always has some.
GraphQLError = 7-
The GraphQL endpoint answered with an
errorsarray.
Remarks
Lets a caller branch on the failure without parsing the message — retrying a TcgDex.TcgDexErrorKind.Timeout or TcgDex.TcgDexErrorKind.Network failure, say, but not an TcgDex.TcgDexErrorKind.InvalidResponse, which will fail the same way again.