Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

RangeError: Invalid string length --- it should be saying Out Of Memory #14170

@scottstensland

Description

@scottstensland

Please update ERROR message when attempting to call

JSON.stringify(monsterously_HUGE_object)

Today when it runs out of RAM above gives this message

RangeError: Invalid string length

when it clearly should indicate the system is out of RAM.
Searching this error message I see nodejs does recognize
an Out Of Memory condition yet it continues to give a less helpful error message

https://github.com/joyent/node/search?utf8=%E2%9C%93&q=RangeError%3A+Invalid+string+length

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions