Add NO_THROW setting to dismiss throwing exceptions#90
Add NO_THROW setting to dismiss throwing exceptions#90kjkta wants to merge 2 commits into
Conversation
|
Thanks for the PR. I agree that silent failure's probably a safe default in a lot of cases, but it also has the likelihood of burying errors and making it more difficult to detect failures. Any project without process monitoring will be reliant on manual testing of functionality, which will be much more difficult with silent SSR failures. For example, if the browser's cached assets, the time before the client-side code mounting may be imperceptible, even for someone looking for failure. Can you change the default value of the setting from Also, do you mind expanding on the setting in the README? Something like
|
|
I would suggest still throwing the exception, but catching it when the setting is on and logging it. Like what I did with That way you still get an error in your logs, and you can still inspect the stack trace in something like sentry. |
|
Thanks for the reply guys! And both of you are totally right... this was my quick fire response to handling some time out issues (which I should find the source of). But I'm happy it brought up the discussion. I think the outcome would be adding an example to the README demonstrating how you could avoid hard fails in production. When I put together a solution I will share. |
In production it's not ideal to rely on the render_server being alive to serve a request. In an exception case the application will throw without giving the chance to "give up" on SSR and load the JS on the client.