Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92379,16 +92379,14 @@ console.log(data);

#### Problem

By default `@upstash/redis` will request responses from the server to be base64
encoded. This is to prevent issues with some edge cases when storing data where
the http response fails to be deserialized using `res.json()`

This solves the problem for almost all edge cases, but it can cause new issues.
Versions of `@upstash/redis` before 1.40.0 request base64 encoded responses from
the server by default. If a response reaches your code without being decoded,
you see the base64 encoded value.

#### Solution

You can disable this behavior by setting `responseEncoding` to `false` in the
options.
Upgrade to `@upstash/redis` 1.40.0 or later, which requests plain responses by
default, or set `responseEncoding` to `false` in the options.

```ts
const redis = new Redis({
Expand All @@ -92397,13 +92395,6 @@ const redis = new Redis({
});
```

This should no longer be necessary, but if you are still experiencing issues
with this, please let us know:

* [Discord](https://discord.gg/w9SenAtbme)
* [X](https://x.com/upstash)
* [GitHub](https://github.com/upstash/upstash-redis/issues/new)

## Large numbers are returned as string

You are trying to load a large number and it is returned as a string instead.
Expand Down
19 changes: 5 additions & 14 deletions redis/sdks/ts/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,14 @@ console.log(data);

#### Problem

By default `@upstash/redis` will request responses from the server to be base64
encoded. This is to prevent issues with some edge cases when storing data where
the http response fails to be deserialized using `res.json()`

This solves the problem for almost all edge cases, but it can cause new issues.
Versions of `@upstash/redis` before 1.40.0 request base64 encoded responses from
the server by default. If a response reaches your code without being decoded,
you see the base64 encoded value.

#### Solution

You can disable this behavior by setting `responseEncoding` to `false` in the
options.
Upgrade to `@upstash/redis` 1.40.0 or later, which requests plain responses by
default, or set `responseEncoding` to `false` in the options.

```ts
const redis = new Redis({
Expand All @@ -57,13 +55,6 @@ const redis = new Redis({
});
```

This should no longer be necessary, but if you are still experiencing issues
with this, please let us know:

- [Discord](https://discord.gg/w9SenAtbme)
- [X](https://x.com/upstash)
- [GitHub](https://github.com/upstash/upstash-redis/issues/new)

## Large numbers are returned as string

You are trying to load a large number and it is returned as a string instead.
Expand Down