Skip to content

Conversation

@jplhomer
Copy link

Fixes #26

Problem

In some cases, bad commands (e.g. invalid keys) sent in parallel at a high throughput to a memcache server will result in the error described in #26.

Since this code path runs in an event listener after client initialization and not as a result of a function called in user land, this results in a crashed Node.js process (aka uncaught exception).

Solution

Check retrieve for truthiness before attempting to push a value on it or set .error on it.

This doesn't solve the underlying root/concurrency problem per-se, but it makes the method more resilient to upstream failure.

@CLAassistant
Copy link

CLAassistant commented Sep 29, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError: setting 'error' on unknown CLIENT_ERROR bad command line format

2 participants