I am willing to author a PR for this:
An issue that I've been having lately with the auto_error_formatter is the only argument is the value of an error. It would greatly beneficial, for the purposes of automatic testing and machine readability, for the function to accept/render the name of the error as well.
There are at least three ways to do this in render and FillingParser:
- invoke the
auto_error_formatter with the error value and name; which is not backwards compatible
- accept an
alt_auto_error_formatter, which would be used instead of auto_error_formatter
- keep
auto_error_formatter as-is, but use a new arg like auto_error_formatter_args, which would default to '["value"]but could be overridden with["name", "value"]; and use that to control what auto_error_formatterdoes. (it could also be a versioned identifier likeauto_error_formatter_version=1vsauto_error_formatter_version=2`)
I am willing to author a PR for this:
An issue that I've been having lately with the
auto_error_formatteris the only argument is the value of an error. It would greatly beneficial, for the purposes of automatic testing and machine readability, for the function to accept/render the name of the error as well.There are at least three ways to do this in
renderandFillingParser:auto_error_formatterwith the error value and name; which is not backwards compatiblealt_auto_error_formatter, which would be used instead ofauto_error_formatterauto_error_formatteras-is, but use a new arg likeauto_error_formatter_args, which would default to '["value"]but could be overridden with["name", "value"]; and use that to control whatauto_error_formatterdoes. (it could also be a versioned identifier likeauto_error_formatter_version=1vsauto_error_formatter_version=2`)