FuncParamType should use ValueError message in self.fail()#3211
FuncParamType should use ValueError message in self.fail()#3211kdeldycke merged 8 commits intopallets:mainfrom
FuncParamType should use ValueError message in self.fail()#3211Conversation
When FuncParamType.convert() caught a ValueError, it discarded the exception message and only passed the input value to self.fail(). This meant users lost context about why the conversion failed. This fix captures and uses the ValueError message, providing better error feedback to users. Falls back to the input value only if the message is empty (backward compatibility). Includes regression test ensuring the message is surfaced in the BadParameter exception.
|
@kdeldycke It seems like you've wanted to include this in stable instead of main so I updated the CHANGES and added 8.3.4 but won't merge it yet as I'm not up to date with plans re 8.3.4. |
|
The current plan is to release 8.4.0. No more 8.3.x. |
I manually changed the target of all PRs from Then @Rowlando13 switch the merging activity from So this PR should go back to target |
FuncParamType should use ValueError message in self.fail()
|
@kdeldycke @AndreasBackx I don't think we have a particular process for deciding the next release. I have just been eyeballing the PRs that @kdeldycke has done or reviewed and said what I think the next release should be. With this one I was planning to do a 8.3.x release, but some of the work definitely required a feature release and main and stable were just synchronized, so just easier to do it all on main, so they can all go in. |
|
Thanks @StevOti for the fix. I'll merge that upstream. |
Fixes #3105
When FuncParamType.convert() caught a ValueError, it discarded the exception message and only passed the input value to self.fail(). This meant users lost context about why the conversion failed.
This fix captures and uses the ValueError message, providing better error feedback to users. Falls back to the input value only if the message is empty (backward compatibility).
Includes regression test ensuring the message is surfaced in the BadParameter exception.