SaturnFramework / Saturn

Opinionated, web development framework for F# which implements the server-side, functional MVC pattern
https://saturnframework.org
MIT License
715 stars 109 forks source link

`use_router` can be called multiple times, but only the last router is used #323

Open baronfel opened 2 years ago

baronfel commented 2 years ago

I was talking to Mathias today and we discovered that he had multiple calls to use_router in his application, so only the second one was being processed. We should look at ways to mitigate this problem, because we don't warn the user in any way about this behavior.

isaacabraham commented 2 years ago

My advice is to throw an exception if this happens (assuming we can detect it). It's easy to do and will fail fast.