Skip to content

Commit 8888f40

Browse files
bobbyg603claude
andauthored
fix: remove presigned url upload (#77)
* Revert to /post/js/ endpoint and add /post/feedback/ for user feedback Remove the presigned URL upload flow (fflate, zip, S3) in favor of direct multipart FormData POSTs. Restore the v8.0.2 /post/js/ endpoint with its original response shape (crash_id, current_server_time, message, url) and error handling (400, 429). Add /post/feedback/ for user feedback submissions. Keep attachments and attributes as first-class options on both endpoints. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix e2e tests to use crash_id instead of crashId Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix npm audit vulnerabilities Run npm audit fix to resolve 4 vulnerabilities (ajv, diff, minimatch, rollup). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ae2e399 commit 8888f40

7 files changed

Lines changed: 395 additions & 387 deletions

File tree

package-lock.json

Lines changed: 118 additions & 127 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bugsplat",
3-
"version": "9.0.0",
3+
"version": "8.0.2",
44
"description": "error reporting for js",
55
"main": "./dist/cjs/index.js",
66
"module": "./dist/esm/index.js",
@@ -56,7 +56,5 @@
5656
"typescript-eslint": "^8.33.1",
5757
"vitest": "^4.0.16"
5858
},
59-
"dependencies": {
60-
"fflate": "^0.8.2"
61-
}
59+
"dependencies": {}
6260
}

spec/bugsplat-response.spec.ts

Lines changed: 24 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,23 @@ describe('validateResponseBody', () => {
66
const responseBodies = [
77
{
88
status: 'success',
9-
crashId: 9,
10-
stackKeyId: 1,
11-
messageId: 1,
12-
infoUrl: 'https://app.bugsplat.com/browse/crashInfo.php',
9+
current_server_time: 1,
10+
message: 'BugSplat rocks!',
11+
url: 'bugsplat.rocks/yes-its-true',
12+
crash_id: 9,
1313
},
1414
{
1515
status: 'fail',
16-
crashId: 100,
17-
stackKeyId: 55,
18-
messageId: 200,
19-
infoUrl: 'https://app.bugsplat.com/browse/crashInfo.php?id=100',
16+
current_server_time: 100,
17+
message: 'Something went wrong',
18+
crash_id: 100,
2019
},
2120
{
2221
status: 'success',
23-
crashId: 333,
24-
stackKeyId: 0,
25-
messageId: 0,
26-
infoUrl: 'https://app.bugsplat.com/browse/crashInfo.php?id=333',
27-
},
28-
{
29-
status: 'success',
30-
crashId: 21417,
31-
stackKeyId: -1,
32-
messageId: -1,
22+
current_server_time: 0,
23+
message: '',
24+
url: 'https://app.bugsplat.com/browse/crashInfo.php',
25+
crash_id: 333,
3326
},
3427
];
3528

@@ -47,35 +40,31 @@ describe('validateResponseBody', () => {
4740
{},
4841
{
4942
status: 'succes',
50-
crashId: 9,
51-
stackKeyId: 1,
52-
messageId: 1,
53-
infoUrl: 'https://app.bugsplat.com',
43+
current_server_time: 1,
44+
message: 'msg',
45+
crash_id: 9,
5446
},
5547
{
5648
status: 'success',
57-
stackKeyId: 1,
58-
messageId: 1,
59-
infoUrl: 'https://app.bugsplat.com',
49+
message: 'msg',
50+
crash_id: 9,
6051
},
6152
{
6253
status: 'success',
63-
crashId: 9,
64-
messageId: 1,
65-
infoUrl: 'https://app.bugsplat.com',
54+
current_server_time: 1,
55+
crash_id: 9,
6656
},
6757
{
6858
status: 'success',
69-
crashId: 9,
70-
stackKeyId: 1,
71-
infoUrl: 'https://app.bugsplat.com',
59+
current_server_time: 1,
60+
message: 'msg',
7261
},
7362
{
7463
status: 'success',
75-
crashId: 9,
76-
stackKeyId: 1,
77-
messageId: 1,
78-
infoUrl: 42,
64+
current_server_time: 1,
65+
message: 'msg',
66+
crash_id: 9,
67+
url: 42,
7968
},
8069
];
8170

spec/bugsplat.e2e.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe('BugSplat', () => {
5555
throw new Error(result.error.message);
5656
}
5757

58-
const expectedCrashId = result.response.crashId;
58+
const expectedCrashId = result.response.crash_id;
5959
const crashData = await client.getCrashById(database, expectedCrashId);
6060
expect(crashData.appName).toEqual(appName);
6161
expect(crashData.appVersion).toEqual(appVersion);
@@ -94,7 +94,7 @@ describe('BugSplat', () => {
9494
throw new Error(result.error.message);
9595
}
9696

97-
const expectedCrashId = result.response.crashId;
97+
const expectedCrashId = result.response.crash_id;
9898
const crashData = await client.getCrashById(database, expectedCrashId);
9999
expect(crashData.appName).toEqual(appName);
100100
expect(crashData.appVersion).toEqual(appVersion);
@@ -115,7 +115,7 @@ describe('BugSplat', () => {
115115
if (result.error) {
116116
throw new Error(result.error.message);
117117
}
118-
const expectedCrashId = result.response.crashId;
118+
const expectedCrashId = result.response.crash_id;
119119
const crashData = await client.getCrashById(database, expectedCrashId);
120120

121121
expect(crashData.appName).toEqual(appName);

0 commit comments

Comments
 (0)