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
I was thinking we should allow the definition of an extension to also expose how the arguments to the factoryFunc are validated ( similar to validating that the route definition itself is valid ).
As you can see, someone accidentally used doge instead of dog in the configuration of the isGood extension without realizing. Now the route will "accidentally" send errors to the client instead of noticing the error register of the route while validating the config options passed to the factory func.
My proposal is have some mechanics for validating what is passed to the factoryFunc when we register the route. Basically, put a validate() on the extension too.
The text was updated successfully, but these errors were encountered:
I was thinking we should allow the definition of an extension to also expose how the arguments to the factoryFunc are validated ( similar to validating that the route definition itself is valid ).
For example:
As you can see, someone accidentally used
doge
instead ofdog
in the configuration of theisGood
extension without realizing. Now the route will "accidentally" send errors to the client instead of noticing the error register of the route while validating the config options passed to the factory func.My proposal is have some mechanics for validating what is passed to the factoryFunc when we register the route. Basically, put a
validate()
on the extension too.The text was updated successfully, but these errors were encountered: