File tree 1 file changed +3
-7
lines changed
packages/shared/akamai-edgeworker-sdk/src/featureStore
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,6 @@ export class EdgeFeatureStore implements LDFeatureStore {
47
47
48
48
try {
49
49
const storePayload = await this . _getStorePayload ( ) ;
50
- if ( ! storePayload ) {
51
- throw new Error ( `Error deserializing ${ this . _rootKey } ` ) ;
52
- }
53
50
54
51
switch ( namespace ) {
55
52
case 'features' :
@@ -73,9 +70,6 @@ export class EdgeFeatureStore implements LDFeatureStore {
73
70
this . _logger . debug ( `Requesting all from ${ this . _rootKey } .${ kindKey } ` ) ;
74
71
try {
75
72
const storePayload = await this . _getStorePayload ( ) ;
76
- if ( ! storePayload ) {
77
- throw new Error ( `${ this . _rootKey } .${ kindKey } is not found in KV.` ) ;
78
- }
79
73
80
74
switch ( namespace ) {
81
75
case 'features' :
@@ -102,7 +96,9 @@ export class EdgeFeatureStore implements LDFeatureStore {
102
96
*
103
97
* @returns
104
98
*/
105
- private async _getStorePayload ( ) : Promise < ReturnType < typeof deserializePoll > > {
99
+ private async _getStorePayload ( ) : Promise <
100
+ Exclude < ReturnType < typeof deserializePoll > , undefined >
101
+ > {
106
102
let payload = this . _cache . get ( ) ;
107
103
if ( payload !== undefined ) {
108
104
return payload ;
You can’t perform that action at this time.
0 commit comments