0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

chore(connector): use literal enum for ConnectorErrorCodes (#1823)

chore(connector): use literal enum for ConnectorErrorCodes
This commit is contained in:
Darcy Ye 2022-08-27 11:05:41 +08:00 committed by GitHub
parent dfa65938bf
commit 186164536c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,18 +32,18 @@ export type ConnectorMetadata = {
};
export enum ConnectorErrorCodes {
General,
InvalidMetadata,
InvalidConfigGuard,
InsufficientRequestParameters,
InvalidConfig,
InvalidResponse,
TemplateNotFound,
NotImplemented,
SocialAuthCodeInvalid,
SocialAccessTokenInvalid,
SocialIdTokenInvalid,
AuthorizationFailed,
General = 'General',
InvalidMetadata = 'InvalidMetadata',
InvalidConfigGuard = 'InvalidConfigGuard',
InsufficientRequestParameters = 'InsufficientRequestParameters',
InvalidConfig = 'InvalidConfig',
InvalidResponse = 'InvalidResponse',
TemplateNotFound = 'TemplateNotFound',
NotImplemented = 'NotImplemented',
SocialAuthCodeInvalid = 'SocialAuthCodeInvalid',
SocialAccessTokenInvalid = 'SocialAccessTokenInvalid',
SocialIdTokenInvalid = 'SocialIdTokenInvalid',
AuthorizationFailed = 'AuthorizationFailed',
}
export class ConnectorError extends Error {