feat: remove 512 message truncate limit#538
Open
miquelbeltran wants to merge 6 commits intomasterfrom
Open
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR removes the hard 512-character truncation on error messages and adds tests and examples to verify support for larger payloads.
- Strip out the
substring(0, 512)truncation inraygun.js. - Add a manual fixture and automated test for messages >1000 characters.
- Provide an example HTML page demonstrating large-payload crash reporting.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/raygun.js | Removed the 512-character substring truncation on finalMessage. |
| tests/specs/v2/payloadLengthTests.js | Added an automated test to assert error messages exceed 1000 chars. |
| tests/fixtures/v2/manualSendVeryLongMessage.html | New fixture page to manually send very long messages. |
| examples/LargePayloadCrashReporting.html | Example demonstrating short, medium, and large error payloads. |
Comments suppressed due to low confidence (2)
tests/fixtures/v2/manualSendVeryLongMessage.html:2
- Add a
langattribute to the<html>element (e.g.,<html lang="en">) to improve accessibility and help screen readers interpret the page language correctly.
<html>
examples/LargePayloadCrashReporting.html:7
- Loading jQuery over HTTP can cause mixed-content errors and poses a security risk. Switch to HTTPS (
https://code.jquery.com/...) to ensure a secure connection.
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains changes to remove the 512
messagepayload limit.Closes #483
Changes
examples/LargePayloadCrashReporting.htmlto test manually that the larger payload is supportedsrc/raygun.jstests/fixtures/v2/manualSendVeryLongMessage.htmlandtests/specs/v2/payloadLengthTests.jsScreenshot
Sending a very large payload on Raygun dashboard