KindeErrorCode enum
Error codes for Kinde SDK exceptions.
Uses kebab-case string codes for cross-SDK compatibility with Kinde's JavaScript, Python, and other SDKs.
This simplified enum matches the pattern used across Kinde SDKs, where errors are represented as simple string codes without additional metadata or categorization.
Example usage:
throw KindeError(
code: KindeErrorCode.userCanceled.code,
message: 'User canceled the login process',
);
// String conversion
final errorCode = KindeErrorCode.fromString('user-canceled');
print(errorCode.code); // 'user-canceled'
Values
- refreshTokenExpired → const KindeErrorCode
- sessionExpiredOrInvalid → const KindeErrorCode
- userCanceled → const KindeErrorCode
- missingConfig → const KindeErrorCode
- webInitializingFailed → const KindeErrorCode
- initializingFailed → const KindeErrorCode
- logoutRequestFailed → const KindeErrorCode
- requestTimedOut → const KindeErrorCode
- noCodeVerifier → const KindeErrorCode
- noAuthRequestStateStored → const KindeErrorCode
- authRequestStateNotMatch → const KindeErrorCode
- notRedirectUrl → const KindeErrorCode
- invalidRedirect → const KindeErrorCode
- unsupportedScheme → const KindeErrorCode
- portalLinkUrlIsNull → const KindeErrorCode
- loginInProcess → const KindeErrorCode
- unknown → const KindeErrorCode
Properties
- code → String
-
Returns the kebab-case error code string.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns the error code string for cross-SDK compatibility.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromString(
String code) → KindeErrorCode - Find error code by its string value.
Constants
-
values
→ const List<
KindeErrorCode> - A constant List of the values in this enum, in order of their declaration.