birdofpreyru / react-native-static-server

Embedded HTTP server for React Native
https://dr.pogodin.studio/docs/react-native-static-server
Other
135 stars 21 forks source link

Improve native error messages #96

Closed birdofpreyru closed 6 months ago

birdofpreyru commented 7 months ago

For native error messages that are related to a particular server instance(s), we should include server ID(s) into the messages, to facilitate debugging using logs. And it is better to do it in the native layer, rather than inject assumed IDs in TS layer. https://github.com/birdofpreyru/react-native-static-server/blob/ad90a446878dd664fec2919a010a0d02b6c1f5fd/android/src/main/java/com/drpogodin/reactnativestaticserver/Errors.kt#L7-L13 :point_up: This code is Android, but the issue is relevant for all platforms.

birdofpreyru commented 7 months ago

Done for Android, iOS, and macOS in v0.10.2. For Windows, I guess, it will wait until some other upgrades have to be done there.