diff --git a/dev-packages/e2e-tests/test-applications/nuxt-3/tests/middleware.test.ts b/dev-packages/e2e-tests/test-applications/nuxt-3/tests/middleware.test.ts index e9debf8496c2..7cb3c84e9050 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-3/tests/middleware.test.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-3/tests/middleware.test.ts @@ -121,7 +121,11 @@ test.describe('Server Middleware Instrumentation', () => { type: 'Error', mechanism: expect.objectContaining({ handled: false, - type: 'auto.middleware.nuxt', + // Type changes depending on whether it is being wrapped by Nitro or not + // This is a timing problem, sometimes Nitro can capture the error first, and sometimes it can't + // If nitro captures the error first, the type will be 'chained' + // If Sentry captures the error first, the type will be 'auto.middleware.nuxt' + type: expect.stringMatching(/^(auto\.middleware\.nuxt|chained)$/), }), }), );