Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify the response string length overflow and throw a specific error #357

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

slvrtrn
Copy link
Contributor

@slvrtrn slvrtrn commented Nov 27, 2024

Summary

Related to #106

According to this commit, the client now throws a specific error if the result string length is more than the max allowed string length in V8, which is 2**29 - 24 on a 64-bit platform.

Previously, the exception was too ambiguous:

  • Node.js: RangeError: Invalid string length
  • Browsers: InternalError: allocation size overflow

Now, the error message is supposed to be more clear.

Checklist

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG

Copy link

sonarcloud bot commented Nov 27, 2024

@slvrtrn slvrtrn merged commit 64ea1eb into main Nov 28, 2024
27 checks passed
@slvrtrn slvrtrn deleted the verify-v8-max-string-length branch November 28, 2024 12:55
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.

2 participants