Open pjlee11 opened 5 years ago
This could push a highly technical and obscure message to a user. Can you not just wrap the call to loadInitialData
in a try-catch block and handle an error message manually yourself? You might want a try-catch block to handle this thrown error anyway (that try-catch block is a bit redundant, I should remove it!).
The main reason I did this was because I found it hard to debug the regex defined in the application compared to the matches it gets once used with react-router-config
. The current error is very vague, which makes sense if it is intended for the end user. However, I would have thought the application would want to catch the error before showing it to the user, which would mean that this could give a highly technical message for easier debugging.
Improves the error so that the regex is also output with the failing route.