[Feature Request] Provide a mechanism to ensure at compile-time that all path params that a handler-proc uses are in the route the handler is used in #161
Labels
enhancement
New feature or request
This one came to me as I started writing procs that build generic prologue handlers:
How can I ensure, that the URL path param that my handler assumes is there (e.g. "id") is actually provided via the URL at compile time?
Basically, if my
awesomeHandlerProc
uses a path param "ids" while the url actually only contains a path param "id" I want the compiler to scream at me.This would eliminate an entire set of runtime errors where your handler tries to access a URL param and it's miss-spelled, or you mixed up which URL it should belong to etc.
It should strictly speaking be possible, the URL and which handler is associated with which URL are both known at compile time. In terms of how to go about it though, I'm not sure how this could be achieved though. Particularly since prologue itself wouldn't know which URL params any prologue-user would make use of in their handler.
The text was updated successfully, but these errors were encountered: