Skip to content

Conversation

@pedro-rosario
Copy link

@pedro-rosario pedro-rosario commented Nov 27, 2018

When trying to save an object to redis, if its not stringified, we get the following error:

This is converted to "[object Object]" by using .toString() now and will return an error from v.3.0 on.

redis/index.js Outdated
if (!shouldProcess(key)) return bluebird.resolve();

return module.exports.client.hsetAsync(REDIS_HASH, key, value);
return module.exports.client.hsetAsync(REDIS_HASH, key, formatValue(value));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this formatting is unexpected behavior (not all PUT requests to this module have required this behavior) I think we should restructure this so we can emit a warn log that we are re-encoding the object before placing it into Redis. So that we can track and squash those issues - we need to be able to log both key and value

@TTaitFoster TTaitFoster added the bug Something isn't working label Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants