@@ -10,7 +10,7 @@ test('Index page', async ({ baseURL }) => {
10
10
11
11
test ( "worker's withSentry" , async ( { baseURL } ) => {
12
12
const eventWaiter = waitForError ( 'cloudflare-workers' , event => {
13
- return event . exception ?. values ?. [ 0 ] ?. mechanism ?. type === 'cloudflare' ;
13
+ return event . exception ?. values ?. [ 0 ] ?. mechanism ?. type === 'auto.http. cloudflare' ;
14
14
} ) ;
15
15
const response = await fetch ( `${ baseURL } /throwException` ) ;
16
16
expect ( response . status ) . toBe ( 500 ) ;
@@ -20,25 +20,27 @@ test("worker's withSentry", async ({ baseURL }) => {
20
20
21
21
test ( 'RPC method which throws an exception to be logged to sentry' , async ( { baseURL } ) => {
22
22
const eventWaiter = waitForError ( 'cloudflare-workers' , event => {
23
- return event . exception ?. values ?. [ 0 ] ?. mechanism ?. type === 'cloudflare_durableobject ' ;
23
+ return event . exception ?. values ?. [ 0 ] ?. mechanism ?. type === 'auto.faas.cloudflare.durable_object ' ;
24
24
} ) ;
25
25
const response = await fetch ( `${ baseURL } /rpc/throwException` ) ;
26
26
expect ( response . status ) . toBe ( 500 ) ;
27
27
const event = await eventWaiter ;
28
28
expect ( event . exception ?. values ?. [ 0 ] ?. value ) . toBe ( 'Should be recorded in Sentry.' ) ;
29
29
} ) ;
30
+
30
31
test ( "Request processed by DurableObject's fetch is recorded" , async ( { baseURL } ) => {
31
32
const eventWaiter = waitForError ( 'cloudflare-workers' , event => {
32
- return event . exception ?. values ?. [ 0 ] ?. mechanism ?. type === 'cloudflare_durableobject ' ;
33
+ return event . exception ?. values ?. [ 0 ] ?. mechanism ?. type === 'auto.faas.cloudflare.durable_object ' ;
33
34
} ) ;
34
35
const response = await fetch ( `${ baseURL } /pass-to-object/throwException` ) ;
35
36
expect ( response . status ) . toBe ( 500 ) ;
36
37
const event = await eventWaiter ;
37
38
expect ( event . exception ?. values ?. [ 0 ] ?. value ) . toBe ( 'Should be recorded in Sentry.' ) ;
38
39
} ) ;
40
+
39
41
test ( 'Websocket.webSocketMessage' , async ( { baseURL } ) => {
40
42
const eventWaiter = waitForError ( 'cloudflare-workers' , event => {
41
- return event . exception ?. values ?. [ 0 ] ?. mechanism ?. type === 'cloudflare_durableobject ' ;
43
+ return event . exception ?. values ?. [ 0 ] ?. mechanism ?. type === 'auto.faas.cloudflare.durable_object ' ;
42
44
} ) ;
43
45
const url = new URL ( '/pass-to-object/ws' , baseURL ) ;
44
46
url . protocol = url . protocol . replace ( 'http' , 'ws' ) ;
@@ -53,7 +55,7 @@ test('Websocket.webSocketMessage', async ({ baseURL }) => {
53
55
54
56
test ( 'Websocket.webSocketClose' , async ( { baseURL } ) => {
55
57
const eventWaiter = waitForError ( 'cloudflare-workers' , event => {
56
- return event . exception ?. values ?. [ 0 ] ?. mechanism ?. type === 'cloudflare_durableobject ' ;
58
+ return event . exception ?. values ?. [ 0 ] ?. mechanism ?. type === 'auto.faas.cloudflare.durable_object ' ;
57
59
} ) ;
58
60
const url = new URL ( '/pass-to-object/ws' , baseURL ) ;
59
61
url . protocol = url . protocol . replace ( 'http' , 'ws' ) ;
0 commit comments