Invalid string length
thorupio opened this issue · 1 comments
thorupio commented
I'm trying to cache an array and I get this error:
RangeError: Invalid string length at JSON.stringify (<anonymous>) at /app/node_modules/cache-manager-redis/index.js:241:24
I'm unable to catch this error in my code for some reason and it messes with my Heroku dyno to have this being flagged as an unhandled promise rejection.
Is there a maximum array size, I should be careful not to exceed?
mrister commented
You are probably dealing with a big Object, consider making it smaller if possible, Also there might be some nice clues here, https://stackoverflow.com/questions/29175877/json-stringify-throws-rangeerror-invalid-string-length-for-huge-objects