endpoints
endpoints copied to clipboard
have @param take an error message
so if you pass in @param("<NAME>", errmsg=...) it would use that errmsg as the error string if param fails in some way, this would allow us to fine tune client facing error messages
This could be done in call.Param's handle method. Basically do a try/except and then check if there is an errmsg flag, if there is then raise a new ValueError with the error message.
You could also allow minor templating with {value} or something like that and then it will always call format on the error message with certain predefined values (assuming format doesn't fail if it has keywords that aren't in the string)