honojs/node-server

Issue with RequestError having static name property

GavinMeierSonos opened this issue · 2 comments

Hard to say if this is a rollup issue or if this is a valid concern but the fix would be easy to implement.

When transpiling into esm. There is an issue with name being defined as a static value on the RequestError instead of just having it defined in the in the constructor. It throws an error saying that read only property name cannot be reassigned.

Happy to open a PR if this would be approved since it wouldn't impact any existing functionality and it does seem odd to define a static field on a class that is defined on the prototype. The fix would be to move the name assignment to the constructor after the super is called.

Hi @GavinMeierSonos

Can you share the details to understand more easily or share the project to reproduce it?