diff --git a/examples/LargePayloadCrashReporting.html b/examples/LargePayloadCrashReporting.html
new file mode 100644
index 00000000..c6317afb
--- /dev/null
+++ b/examples/LargePayloadCrashReporting.html
@@ -0,0 +1,76 @@
+
+
+
+
+ Raygun Crash Reporting - Large Payload Example
+
+
+
+
+
+
+
+
+
+
+
+
Raygun4JS - Large Payload Support
+
+ This example demonstrates that Raygun4JS now supports error messages longer than 512 characters.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/raygun.js b/src/raygun.js
index a0d74234..8ca30d6d 100644
--- a/src/raygun.js
+++ b/src/raygun.js
@@ -865,10 +865,6 @@ var raygunFactory = function (window, $, undefined) {
finalMessage = scriptError;
}
- if (finalMessage && typeof finalMessage === 'string') {
- finalMessage = finalMessage.substring(0, 512);
- }
-
var pageLocation;
if (!Raygun.Utilities.isReactNative()) {
pageLocation = [
diff --git a/tests/fixtures/v2/manualSendVeryLongMessage.html b/tests/fixtures/v2/manualSendVeryLongMessage.html
new file mode 100644
index 00000000..2490705d
--- /dev/null
+++ b/tests/fixtures/v2/manualSendVeryLongMessage.html
@@ -0,0 +1,26 @@
+
+
+
+ Raygun4JS with V2 API - Very Long Message Test
+
+
+
+
+
+
+
diff --git a/tests/specs/v2/payloadLengthTests.js b/tests/specs/v2/payloadLengthTests.js
new file mode 100644
index 00000000..81814974
--- /dev/null
+++ b/tests/specs/v2/payloadLengthTests.js
@@ -0,0 +1,20 @@
+var _ = require('underscore');
+
+describe("Large payload support tests for v2 manual send", function() {
+
+ it("supports very large error messages (>1000 characters)", async function () {
+ await browser.url('http://localhost:4567/fixtures/v2/manualSendVeryLongMessage.html');
+
+ await browser.pause(4000);
+
+ var requestPayloads = await browser.execute(function () {
+ return window.__requestPayloads;
+ });
+
+ var passes = _.any(requestPayloads, function (payload) {
+ return payload.Details.Error.Message.length > 1000;
+ });
+
+ expect(passes).toBe(true);
+ });
+});