Skip to content

Commit 8773b4a

Browse files
authored
fix: edge example in readme
1 parent 70c8889 commit 8773b4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,10 @@ const redis = upstash({
9797
// -> null | string
9898
console.log(metadata);
9999
// -> { edge: boolean, cache: null | 'miss' | 'hit' }
100+
100101
// the below reads using REST url (non-edge)
101-
const { data2, error2, metadata2 } = await redis.get('key', {edge: false});
102+
const get1 = await redis.get('key', {edge: false});
103+
if (get1.error) throw get1.error;
102104
} catch (error) {
103105
console.error(error);
104106
}

0 commit comments

Comments
 (0)