Namely, I'd like to move the handler into its own object, that doesn't require me to include stuff like Params Dictionary or QueryString if I don't need them. As well, I'd like to centralize my error handling and include it in the handler type so it's easier to see that it can error out. The first approach modifies the PostResponse which is messy since it needs more types.
Currently I create the type for each route as follows:
Instead I'd like to something closer to this as it's clearer:
Namely, I'd like to move the handler into its own object, that doesn't require me to include stuff like Params Dictionary or QueryString if I don't need them. As well, I'd like to centralize my error handling and include it in the handler type so it's easier to see that it can error out. The first approach modifies the PostResponse which is messy since it needs more types.