We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
send
1 parent 6628437 commit b6c6ba5Copy full SHA for b6c6ba5
src/client.ts
@@ -219,14 +219,21 @@ export class RedisClient {
219
commands: ([string, ...RedisValue[]] | undefined)[],
220
writer: WritableStreamDefaultWriter<Uint8Array>,
221
) {
222
+ const stack = new Error().stack;
223
const chunks: Array<string | Uint8Array> = [];
224
const promises = commands.map((command) => {
225
if (!command) {
226
return;
227
}
228
encodeCommand(command, chunks);
229
return new Promise<RedisResponse>((resolve, reject) => {
- this.#responseQueue.push({ resolve, reject });
230
+ this.#responseQueue.push({
231
+ resolve,
232
+ reject(error) {
233
+ error.stack = stack;
234
+ reject(error);
235
+ },
236
+ });
237
});
238
239
for (const chunk of chunks) {
0 commit comments