configpanel: improve debugging/error message when pydantic fails to validate the options etc

This commit is contained in:
Alexandre Aubin 2024-02-03 16:49:58 +01:00
parent b427783721
commit 9a7ec301a6

View file

@ -2224,8 +2224,7 @@ def parse_raw_options(
try:
model = OptionsModel(**raw_options)
except ValidationError as e:
error = "\n".join([err["msg"] for err in e.errors()])
raise YunohostError(error, raw_msg=True)
raise YunohostError("While parsing manifest: " + str(e), raw_msg=True)
model.translate_options()