You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VersionService1 and VersionService2 are both trying to mount on the same route. When we start the server, one wins and one loses (I guess the order we register the services in is important here) but it doesn't throw an error. In the example above, it is pretty easy to debug, but once you've got services spread across multiple files this condition could become quite hard to detect.
It would be a nice safeguard if we added a check when we register the service classes which throws an error if we have declared any duplicate or conflicting routes.
The text was updated successfully, but these errors were encountered:
It occurred to me there's something else we could do here. We could collect all the example URLs, and then run them through each service and make sure they only match one of them. It shouldn't be too hard to add negative lookaheads to prevent false positives.
This is a bit of a contrived example, but if I declare something like:
VersionService1
andVersionService2
are both trying to mount on the same route. When we start the server, one wins and one loses (I guess the order we register the services in is important here) but it doesn't throw an error. In the example above, it is pretty easy to debug, but once you've got services spread across multiple files this condition could become quite hard to detect.It would be a nice safeguard if we added a check when we register the service classes which throws an error if we have declared any duplicate or conflicting routes.
The text was updated successfully, but these errors were encountered: