Unverified Commit 4c1cf26c authored by Igor Šćekić's avatar Igor Šćekić Committed by GitHub

correctly rethrow instrumentation loading error (#65251)

Co-authored-by: 's avatarJiachi Liu <inbox@huozhi.im>
parent e6566989
...@@ -303,8 +303,10 @@ export default class NextNodeServer extends BaseServer< ...@@ -303,8 +303,10 @@ export default class NextNodeServer extends BaseServer<
) )
} catch (err: any) { } catch (err: any) {
if (err.code !== 'MODULE_NOT_FOUND') { if (err.code !== 'MODULE_NOT_FOUND') {
err.message = `An error occurred while loading instrumentation hook: ${err.message}` throw new Error(
throw err 'An error occurred while loading the instrumentation hook',
{ cause: err }
)
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment