SponsorkitErrorCodes
The values of SponsorkitError.Code.
On this page
The values of SponsorkitError.Code.
namespace Sponsorkit;
public static class SponsorkitErrorCodesConstants#
| Member | Description |
|---|---|
InvalidConfig | Missing or invalid configuration: no targets, a malformed target, an unknown mock preset, invalid checkout options, or (dev-time check) a target that does not exist. |
Disabled | Sponsorkit is disabled through SPONSORKIT_DISABLE. |
PopupBlocked | Browser only; never thrown by the .NET SDK. |
AccessDenied | The supporter denied access at the provider. |
InvalidState | The sign-in state expired or could not be verified. |
ProviderError | The provider failed during sign-in. |
InvalidCode | The API rejected the sign-in code exchange (400 invalid_code): the code is malformed or expired, or the PKCE verifier did not match. |
Cancelled | Sign-in was abandoned or cancelled through its CancellationToken, or no paste-back code was entered. |
Timeout | Sign-in did not complete within SponsorkitOptions.SignInTimeout (default 5 minutes). |
NetworkError | During sign-in or SponsorkitServer.VerifySessionAsync, the API could not be reached or answered 5xx, 429 or an unexpected response. |
SessionInvalid | The session token is invalid or expired. |
TargetsMismatch | The session is bound to a different target set. |
InvalidConfig#
public const string InvalidConfig = "invalid_config";Missing or invalid configuration: no targets, a malformed target, an unknown mock preset, invalid checkout options, or (dev-time check) a target that does not exist.
Value: "invalid_config"
Disabled#
public const string Disabled = "disabled";Sponsorkit is disabled through SPONSORKIT_DISABLE.
Value: "disabled"
PopupBlocked#
public const string PopupBlocked = "popup_blocked";Browser only; never thrown by the .NET SDK. Listed for parity with the protocol.
Value: "popup_blocked"
AccessDenied#
public const string AccessDenied = "access_denied";The supporter denied access at the provider.
Value: "access_denied"
InvalidState#
public const string InvalidState = "invalid_state";The sign-in state expired or could not be verified.
Value: "invalid_state"
ProviderError#
public const string ProviderError = "provider_error";The provider failed during sign-in.
Value: "provider_error"
InvalidCode#
public const string InvalidCode = "invalid_code";The API rejected the sign-in code exchange (400 invalid_code): the code is malformed or expired, or the PKCE verifier did not match.
Value: "invalid_code"
Cancelled#
public const string Cancelled = "cancelled";Sign-in was abandoned or cancelled through its CancellationToken, or no paste-back code was entered.
Value: "cancelled"
Timeout#
public const string Timeout = "timeout";Sign-in did not complete within SponsorkitOptions.SignInTimeout (default 5 minutes).
Value: "timeout"
NetworkError#
public const string NetworkError = "network_error";During sign-in or SponsorkitServer.VerifySessionAsync, the API could not be reached or answered 5xx, 429 or an unexpected response. SponsorkitError.RetryAfter is set when the API sent Retry-After.
Value: "network_error"
SessionInvalid#
public const string SessionInvalid = "session_invalid";The session token is invalid or expired. Only thrown by SponsorkitServer.VerifySessionAsync.
Value: "session_invalid"
TargetsMismatch#
public const string TargetsMismatch = "targets_mismatch";The session is bound to a different target set. Only thrown by SponsorkitServer.VerifySessionAsync.
Value: "targets_mismatch"