vercel / next.js

The React Framework
https://nextjs.org
MIT License
121.29k stars 25.95k forks source link

correctly rethrow instrumentation loading error #65251

Open iscekic opened 2 weeks ago

iscekic commented 2 weeks ago

we can't assume the thrown error will have a settable message property if we do, we end up with an entirely different error thrown

Failed to prepare server TypeError: Cannot set property message of [object Object] which has only a getter
    at NextNodeServer.prepareImpl
ijjk commented 2 weeks ago

Allow CI Workflow Run

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

iscekic commented 2 weeks ago

@AbhiShake1 I don't have the time to get the test suite running locally right now - I did improve the line however, using the mdn-blessed way of rethrowing errors.

AbhiShake1 commented 2 weeks ago

@AbhiShake1 I don't have the time to get the test suite running locally right now - I did improve the line however, using the mdn-blessed way of rethrowing errors.

That should make it better. Thanks