Skip to content

Commit cf59ecb

Browse files
author
Reno
authored
fix: Add version property to http-event-schema (#122)
1 parent f638608 commit cf59ecb

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

src/event-schemas/http-event.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
"error": {
3131
"type": "object",
3232
"properties": {
33+
"version": {
34+
"type": "string",
35+
"description": "JSErrorEvent schema version."
36+
},
3337
"type": {
3438
"type": "string",
3539
"description": "Error type (eg., TypeError, ParseError, etc)."

src/plugins/event-plugins/__tests__/FetchPlugin.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ describe('FetchPlugin tests', () => {
163163
method: 'GET'
164164
},
165165
error: {
166+
version: '1.0.0',
166167
type: 'Timeout'
167168
}
168169
});
@@ -194,6 +195,7 @@ describe('FetchPlugin tests', () => {
194195
method: 'GET'
195196
},
196197
error: {
198+
version: '1.0.0',
197199
type: 'Error',
198200
message: 'Timeout',
199201
stack: expect.stringContaining('FetchPlugin.test.ts')
@@ -513,6 +515,7 @@ describe('FetchPlugin tests', () => {
513515
method: 'GET'
514516
},
515517
error: {
518+
version: '1.0.0',
516519
type: 'FetchError',
517520
message: 'timeout',
518521
stack: 'stack trace'
@@ -547,6 +550,7 @@ describe('FetchPlugin tests', () => {
547550
method: 'GET'
548551
},
549552
error: {
553+
version: '1.0.0',
550554
type: 'FetchError',
551555
message: 'timeout'
552556
}

src/plugins/event-plugins/__tests__/XhrPlugin.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ describe('XhrPlugin tests', () => {
258258
method: 'GET'
259259
},
260260
error: {
261+
version: '1.0.0',
261262
type: 'XMLHttpRequest error',
262263
message: '0'
263264
}
@@ -342,6 +343,7 @@ describe('XhrPlugin tests', () => {
342343
method: 'GET'
343344
},
344345
error: {
346+
version: '1.0.0',
345347
type: 'XMLHttpRequest timeout'
346348
}
347349
});
@@ -428,6 +430,7 @@ describe('XhrPlugin tests', () => {
428430
method: 'GET'
429431
},
430432
error: {
433+
version: '1.0.0',
431434
type: 'XMLHttpRequest abort'
432435
}
433436
});

0 commit comments

Comments
 (0)