Commit 3211894
committed
When looking up a topic by
As route data comes from user-submitted requests, it's expected that some may contain invalid keys. From that perspective, an invalid key is no different than having an invalid URL. As such, we should return a null result, not bubble up an exception.
In practical terms, that means that calling e.g. `/Web/Invalid/Url` and calling `/Web/Invalid/~Url` will both end up returning a 404 error when processed by the `[ValidateTopic]` attribute. By contrast, previously, the former would return a 404 while the latter would return a 500 error due to the `InvalidKeyException`.RouteData, swallow InvalidKeyException
1 parent 0edab34 commit 3211894
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
| |||
0 commit comments