File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/nuxt/src/runtime/plugins Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,10 @@ export const sentryCloudflareNitroPlugin =
81
81
const pathname = handlerArgs [ 0 ] ;
82
82
const event = handlerArgs [ 1 ] ;
83
83
84
- if ( isEventType ( event ) ) {
84
+ if ( ! isEventType ( event ) ) {
85
+ logger . log ( "Nitro Cloudflare plugin did not detect a Cloudflare event type. Won't patch Cloudflare handler." ) ;
86
+ return handlerTarget . apply ( handlerThisArg , handlerArgs ) ;
87
+ } else {
85
88
const requestHandlerOptions = {
86
89
options : { ...sentryOptions , continueTraceFromPropagationContext : true } ,
87
90
request : { ...event , url : `${ event . protocol } //${ event . host } ${ pathname } ` } ,
@@ -110,8 +113,6 @@ export const sentryCloudflareNitroPlugin =
110
113
return handlerTarget . apply ( handlerThisArg , handlerArgs ) ;
111
114
} ) ;
112
115
}
113
-
114
- return handlerTarget . apply ( handlerThisArg , handlerArgs ) ;
115
116
} ,
116
117
} ) ;
117
118
You can’t perform that action at this time.
0 commit comments