44 JsonValue ,
55 ResolutionDetails ,
66 Logger ,
7- ProviderStatus ,
87 StandardResolutionReasons ,
9- ErrorCode ,
108 TypeMismatchError ,
119 GeneralError ,
1210 ProviderFatalError ,
@@ -80,13 +78,7 @@ export class FliptWebProvider implements Provider {
8078 const evalContext : Record < string , string > = transformContext ( context ) ;
8179
8280 try {
83- const resp = this . _client ?. evaluateBoolean ( flagKey , context . targetingKey ?? '' , evalContext ) ;
84-
85- if ( resp ?. status === 'failure' ) {
86- throw new GeneralError ( resp . error_message ) ;
87- }
88-
89- const result = resp ?. result ;
81+ const result = this . _client ?. evaluateBoolean ( flagKey , context . targetingKey ?? '' , evalContext ) ;
9082
9183 switch ( result ?. reason ) {
9284 case EvaluationReason . DEFAULT :
@@ -151,13 +143,7 @@ export class FliptWebProvider implements Provider {
151143 const evalContext : Record < string , string > = transformContext ( context ) ;
152144
153145 try {
154- const resp = this . _client ?. evaluateVariant ( flagKey , context . targetingKey ?? '' , evalContext ) ;
155-
156- if ( resp ?. status === 'failure' ) {
157- throw new GeneralError ( resp . error_message ) ;
158- }
159-
160- const result = resp ?. result ;
146+ const result = this . _client ?. evaluateVariant ( flagKey , context . targetingKey ?? '' , evalContext ) ;
161147
162148 if ( result ?. reason === EvaluationReason . FLAG_DISABLED ) {
163149 return {
@@ -175,7 +161,7 @@ export class FliptWebProvider implements Provider {
175161
176162 const flagValue : PrimitiveType | U = validateFlagType (
177163 flagType ,
178- flagType === 'json' ? result . variant_attachment : result . variant_key ,
164+ flagType === 'json' ? result . variantAttachment : result . variantKey ,
179165 ) ;
180166
181167 return {
0 commit comments