@@ -10,7 +10,7 @@ test('Index page', async ({ baseURL }) => {
1010
1111test ( "worker's withSentry" , async ( { baseURL } ) => {
1212 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' ;
1414 } ) ;
1515 const response = await fetch ( `${ baseURL } /throwException` ) ;
1616 expect ( response . status ) . toBe ( 500 ) ;
@@ -20,25 +20,27 @@ test("worker's withSentry", async ({ baseURL }) => {
2020
2121test ( 'RPC method which throws an exception to be logged to sentry' , async ( { baseURL } ) => {
2222 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 ' ;
2424 } ) ;
2525 const response = await fetch ( `${ baseURL } /rpc/throwException` ) ;
2626 expect ( response . status ) . toBe ( 500 ) ;
2727 const event = await eventWaiter ;
2828 expect ( event . exception ?. values ?. [ 0 ] ?. value ) . toBe ( 'Should be recorded in Sentry.' ) ;
2929} ) ;
30+
3031test ( "Request processed by DurableObject's fetch is recorded" , async ( { baseURL } ) => {
3132 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 ' ;
3334 } ) ;
3435 const response = await fetch ( `${ baseURL } /pass-to-object/throwException` ) ;
3536 expect ( response . status ) . toBe ( 500 ) ;
3637 const event = await eventWaiter ;
3738 expect ( event . exception ?. values ?. [ 0 ] ?. value ) . toBe ( 'Should be recorded in Sentry.' ) ;
3839} ) ;
40+
3941test ( 'Websocket.webSocketMessage' , async ( { baseURL } ) => {
4042 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 ' ;
4244 } ) ;
4345 const url = new URL ( '/pass-to-object/ws' , baseURL ) ;
4446 url . protocol = url . protocol . replace ( 'http' , 'ws' ) ;
@@ -53,7 +55,7 @@ test('Websocket.webSocketMessage', async ({ baseURL }) => {
5355
5456test ( 'Websocket.webSocketClose' , async ( { baseURL } ) => {
5557 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 ' ;
5759 } ) ;
5860 const url = new URL ( '/pass-to-object/ws' , baseURL ) ;
5961 url . protocol = url . protocol . replace ( 'http' , 'ws' ) ;
0 commit comments