We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ec08d8 commit 4fbf19bCopy full SHA for 4fbf19b
packages/next/src/server/web/globals.ts
@@ -43,10 +43,9 @@ export async function edgeInstrumentationOnRequestError(
43
) {
44
await instrumentation.onRequestError(...args)
45
}
46
- } catch (err: any) {
47
- // Throw hard error since middleware is critical path here, if it's error then the request will fail anyway.
48
- err.message = `An error occurred while running instrumentation request error handler: ${err.message}`
49
- throw err
+ } catch (err) {
+ // Log the soft error and continue, since the original error has already been thrown
+ console.error('Error in instrumentation.onRequestError:', err)
50
51
52
0 commit comments