Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRefactor DOMException handling code to avoid redundant exceptions generation #724
Comments
This really becomes counterproductive when |
Would be great if this issue could be taken into consideration! |
@andrekovac exactly. I've got so many dependencies, none of them causing anything like this. It's only fetch, and causing whole (already-slow) debugger to step everytime I restart my RN app, and no one is even willing to fix it. I think I'll just switch to something else like axios if none of my dependencies explicitly depend on fetch. |
@canpoyrazoglu, you yourself are not willing to fix this. This is an open source project worked on by people in their spare time. You can just as easily fix the issue yourself. |
That took 3 minutes to fix. #797 |
Hello, we are the development team of VS Code extension for debugging React Native apps (vscode-react-native).
whatwg-fetch
package is used in React Native lib. In our extension we debug React Native apps as a Node.js processes. Node JS global context doesn't containDOM
modules, so"exports.DOMException is not a constructor"
exception is generated inwhatwg-fetch
package if fetch function is used in a React Native project.Could it be better to firstly verify if there is
DOMException
module in environment global context and only after that use try/catch construction? IfDOMException
module doesn’t exist it can be better to create this module without exception generation.Here is the issue for the corresponding case in the debugger extension repository.