From 186164536ca253d1d2eea0a7df132ab3460a1ac0 Mon Sep 17 00:00:00 2001 From: Darcy Ye Date: Sat, 27 Aug 2022 11:05:41 +0800 Subject: [PATCH] chore(connector): use literal enum for ConnectorErrorCodes (#1823) chore(connector): use literal enum for ConnectorErrorCodes --- packages/connector-core/src/types.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/connector-core/src/types.ts b/packages/connector-core/src/types.ts index 41d75ea3b..ce09b1c40 100644 --- a/packages/connector-core/src/types.ts +++ b/packages/connector-core/src/types.ts @@ -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 {